3 ms·
Why do you say none, then immediately list a few advantages of Rust? To build on your points: - it might be a easier language to target with a compiler because
by vanderZwan 8y ago
Why do you say none, then immediately list a few advantages of Rust? To build on your points:
- it might be a easier language to target with a compiler because it's a higher-level intermediate language
- there would be fewer undefined behavior shenanigans
- successfully writing a compiler that targets Rust without using unsafe (too much) would mean getting (some of) the safety benefits as a side-effect. Could especially be relevant for languages aiming to introduce zero-overhead safety to the embedded environment themselves
- regarding previous point: discovering bugs in the process of porting to Rust
- because Rust plays relatively nicely with C and C++, one wouldn't have to lose existing libraries along the way
- AWildC182 8y agoI'm saying "None" in response to needing compilers that compile to Rust, not to rust itself. Basically to boil down my argument, we don't need to compile to Rust instead of C because simply replacing C with Rust should be sufficient. People made "compiles to C" languages because C was not capable of doing everything they wanted easily.
- vanderZwan 8y agoAaah, I see where you are coming from. Yes, that is a good point. Porting a compiler could still be useful for the sake of legacy code though.
- gpderetta 8y agoIt seems to me that writing a compiler that can target safe rust would be extremely hard with little benefit.