3 ms·
I've never understood the feeling that C is complex. Simple syntax, simple rules, a few hidden gotchas for the unwary. "down to operator" = unhelpful use of wh
by anexprogrammer 10y ago
I've never understood the feeling that C is complex. Simple syntax, simple rules, a few hidden gotchas for the unwary.
"down to operator" = unhelpful use of whitespace. postdecrement x, check if >0
I still find C one of the easiest to pick apart. Obfuscated C entries excepted!
- gkya 10y agoC is easy, computers are complex. Sometimes these are confused. Like in this case, the syntax is easy to human-parse, but it's harder to reason about the result of the expression on different architectures and with different compilers, yet the complexity is caused by the computer, not the language.
- anexprogrammer 10y agoQuite. I started out in a world of C99, endianness and differing bit packing. My early day to day involved many more unions and a lot more time wondering if SunOS cc was going to behave the same as Dynix or MSC on DOS. It's easy to forget how much of that mindless preprocessor and make conditionality we've left behind. Sadly in exchange for hardware that's much blander now.
- viraptor 10y ago> simple rules The rules are simple for simple projects. Then you get into things like undefined behaviours, implementation-specific behaviours, etc. Which compilers will abuse heavily for optimisations without telling you about it - for example like the case of silently removing NULL checks. Also any undefined behaviour at all in your source code allows the compiler to throw away all code after it. Without telling you about it.