4 ms·
Except that Rust compilers seem incredibly hard to implement, as opposed to C.
by haolez 5y ago
Except that Rust compilers seem incredibly hard to implement, as opposed to C.
- echelon 5y agoI don't think minimal compiler complexity is a real requirement as much as safe and reliable software is. CPU fabs aren't easy, yet we're fine with that.
- haolez 5y agoIt matters for portability. I'm not saying it's the most important requirement, of course, but it's C strongest point.
- Zababa 5y agoDo you need to build an entire compiler or "just" the backend/code generation to port something? Although "just" a code generation for Rust means building one for LLVM, which I'm sure is harder than some C compilers out there.
- deleted 5y ago[deleted]
- maxpert 5y agoThat is very true but absolutely fine because then some fine set of engineers can do the hard lifting parts and rest of the ecosystem can thrive on stable base that core establishes. That is how things work in most of industries, not everybody is writing a compiler (or even suitable for writing one!), but the complexity compilers remove lets you build more complex pieces of engineering.
- pas 5y agoTo give some perspective: mrustc is written mostly by one person, in C++ and it caught up to 1.39.0 recently - meaning it can "compile" rustc itself (without any type safety validation) as opposed to arbitrary Rust code. Also C++ compilers are hard too. And optimizing C compilers are hard too...