4 ms·
But you can't just add types to C and it becomes rust. It needs serious refactoring. You'd probably go lib by lib, whereas you can rename a JS file to TS and it
by egeozcan 6y ago
But you can't just add types to C and it becomes rust. It needs serious refactoring. You'd probably go lib by lib, whereas you can rename a JS file to TS and it starts checking types (even without, if you configure it that way).
By the way, I love rust, but I just don't understand the "rewrite all the things" hype. Being battle tested means a lot for low-level libs. You can't guarantee that you ported everything exactly, with bugs and all. Pragmatic solutions like "Checked C" prove a lot in that regard.
- TazeTSchnitzel 6y ago> you can't just add types to C and it becomes Rust You actually can “just” turn C into Rust with something like c2rust. But you haven't gained any safety without refactoring. Is that not also the case for Checked C?
- egeozcan 6y agoYou cannot be sure that you kept 100% of the semantics when you use c2rust. You need to focus on semantics plus the types. With checked c, you can just keep your focus on the types.