2 ms·
C's beauty can be deceptive - it has its fair share of corner cases, and with compilers trying to exploit undefined behavior for more aggressive optimizations,
by krylon 11y ago
C's beauty can be deceptive - it has its fair share of corner cases, and with compilers trying to exploit undefined behavior for more aggressive optimizations, these have become easier to run into.
And having run into my fair share of memory-related problems in C, there are languages I much prefer for everyday programming (Go, Python). Ironically, the kind of issues a garbage collector addresses have never been much of a problem for me. But there have been times where I would have killed for a compiler switch to enable array bounds checks; this might reflect poorly on my programming skills, but this is by far the nastiest type of problem I have run into using C.
But C makes it still much, much easier to form a reasonably accurate model of how your code will be executed on the computer at runtime than C++. Compared to the alternatives (C++, Ada, Rust come to mind), C is still a gem of simplicity, and it continues to be popular for a good reason.