4 ms·
I think it’s pretty simple. What aspects do you see as complex?
by __d 3y ago
I think it’s pretty simple. What aspects do you see as complex?
- pornel 3y agoUndefined Behavior is the obvious one. It's everywhere, with more subtle rules than most people realize, and yet it's invisible. Taking advantage of actual portability of C adds dealing with variable integer sizes, and requires even more care around implicit type conversions. Lack of any thread-safety in the language shifts that complexity onto programs and programmers. Similarly lack of memory safety in the language itself pushes the complexity to the tooling — analyzers, sanitizers, fuzzers, hardening. Writing C properly requires a lot more stuff that isn't so simple. Plus there's a lot of dumb pointless complexity of just dealing with needless compiler and platform differences, build systems, and dependencies. Half of the time leading to a paradox of C being super portable, but Unix programmers telling Windows users their OS and compiler sucks and isn't supported, and vice-versa. BTW "simple" in English is ambiguous and could be interpreted as either synonym for "easy", or "consisting of few/basic parts". C is the latter. Actually writing proper safe reliable C requires skill and experience way beyond the spartan basics of the language itself.
- __d 3y agoI agree that using C safely and correctly requires a bunch of skill and experience, and that perhaps makes the sense of "easy" untrue: it's hard to use C well. I was thinking more of your second sense.