7 ms·
Compared to C I'd say the biggest issue is complexity, of which compile time is a consequence.
by codr7 2y ago
Compared to C I'd say the biggest issue is complexity, of which compile time is a consequence.
- baq 2y agoThe C standard makes provisions for compiler implementers which absolve them from responsibility of ignoring the complexity of the C language. Since most people never actually learn all the undefined behavior specified in the standard and compilers allow it, it might seem the language is simpler, but it's actually only compilers which are simpler. You can argue that Rust generics are a trivial example of increased complexity vs the C language and I'd kinda agree: except the language would be cumbersome to use without them but with all the undefined C behavior defined. Complexity can't disappear, it can be moved around.
- codr7 2y agoTrue, if C wanted to be Rust it would be just as complicated. But who cares? The fact that C chooses not to nail everything down makes it a simpler and more flexible language, which is why it's sometimes preferred.
- Dylan16807 2y agoUndefined behavior does not make things simpler.
- codr7 2y agoIt does too make the language simpler, and there's no way to rustle your way around that fact.
- Dylan16807 2y agoIt makes the document describing C simpler. It makes the C semantics you are coding against more complex. Lots of unlisted or handwaved things in the spec become problems you need to keep in mind far more often than you would with better definitions.