Skip to content

Comment on Emitting Safer Rust with C2Rustparent

Comments

I don't believe GPT is built for this still. There's a too big risk it will fill in another implementation from its training instead of adapting the input.

Here, who says the idiomatic translation is not .sort()? It should use the stdlib.

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.

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.