3 ms·
Usually rewriting something in Rust requires nontrivial choices on the part of the translator that I’m not sure are currently within the reach of LLMs.
by saagarjha 9mo ago
Usually rewriting something in Rust requires nontrivial choices on the part of the translator that I’m not sure are currently within the reach of LLMs.
- koakuma-chan 9mo agoI heard this before, that apparently there are things you cannot implement in Rust. Like, apparently you cannot implement certain data structures in Rust. I think this is bullshit. Rust supports raw pointers, etc. You can implement whatever you want in Rust.
- johnisgood 9mo agoYes, you are looking for https://rcoh.me/posts/rust-linked-list-basically-impossible/ https://rcoh.me/posts/rust-linked-list-basically-impossible/.
- staticassertion 9mo agoPresumably they are saying that you'd end up using a lot of `unsafe`. Of course, that's still much better than C, but I assume that their point isn't "You can't do it in Rust" it's "You can't translate directly to safe rust from C".
- koakuma-chan 9mo ago> Of course, that's still much better than C Exactly. "can't translate to safe Rust" is not a good faith argument.
- koakuma-chan 9mo agoIf anything, writing unsafe code in Rust is also fun. It has many primitives like `MaybeUninit` that make it fun.
- saagarjha 9mo agoThat’s not what I said. I am saying that translating C code to Rust usually involves a human in the loop because it requires non-trivial decisions to produce a good result.