Hacker News new | ask | show | jobs
by nindalf 1191 days ago
I say the idiomatic translation of a function named insertion_sort() should not use the stdlib sort. The algorithm used by Rust’s stdlib is PDQsort.

In general translations should stay as close to the original as possible, while eliminating any possibility of segfaults.

1 comments

That's a literal translation, not to idiomatic Rust - in my opinion. All depends on what the semantics of the program should be.