3 ms·
I've attempted to implement this: https://lib.rs/citrus https://lib.rs/citrus And my conclusion is: No. • Rust deliberately makes unsafe syntax ugly and noisy
by pornel 6y ago
I've attempted to implement this: https://lib.rs/citrus https://lib.rs/citrus
And my conclusion is: No.
• Rust deliberately makes unsafe syntax ugly and noisy to steer users towards the good parts.
• C idioms are very different from Rust, and much harder to translate to "nice" Rust than it seems (e.g. getting rid of linked lists, or translating `goto cleanup` to RAII, pointer arithmetic to iterators quickly runs out of trivial cases and becomes a Sufficiently Smart Compiler problem).
There's https://c2rust.com https://c2rust.com that at least preserves semantics accurately.