Re:What every compiler writer should know about programmers ...
by MaulingMonkey on Monday April 15, 2019 @04:43AM
(#19663988)
If it makes you feel any better, I have given up on seeing C fixed in my lifetime, and have contributed at least one patchset to rustc and a related patch to lld-link. You're 100% right that Rust isn't as proven - even to me and my niches - but it's been proven to me that C will remain broken, and Rust is one of the more promising alternatives.
The choice to seek out new alternatives needs justification though. "Why not C" and "What should these other languages do differently" are important discussion topics, and those topics invariably circle around to basically the same conversation anyways - what would it take to "fix" C, and how can we do that in not-C since it's not getting done in C.
(While I haven't tried multiple compilers for rust, I have for C#, and the equivalent parsers + runtimes for JS. I've even encountered some inconsistencies! Just... not on the same order of magnitude as in C++. Ditto for codegen bugs.)
(otherwise, yes, just because it's C doesn't automatically mean it's portable. However, C's continued success across the ages can't be exclusively ascribed to its flaws :). How many different Rust compilers do you know, so that you may complain about inconsistencies among their borrow checkers, or about flaws in their codegens and optimizers?)