4 ms·
"C is fine if you know what you're doing" is the "trust me, bro" approach to software engineering. Even experienced "C kernel wizards" make stupid mistakes. Als
by kmeisthax 2y ago
"C is fine if you know what you're doing" is the "trust me, bro" approach to software engineering. Even experienced "C kernel wizards" make stupid mistakes. Also, nobody actually knows what a pointer is, not even the wizards; we keep learning new things about them every time someone finds a combination of optimizations that cause miscompiles[0]. For something as security-critical as an OS kernel, the correct approach is to have automatic verification - i.e. code can't stab you in the back if it can't compile.
[0] Pointer provenance was discovered this way
- phendrenad2 2y agoSee, I'm coming from the perspective that people who work with Language X have learned where all the dark corners of Language X are. Would you expect anything else? C does not have more dark corners than Python, Ruby, PHP, LISP, Rust, etc. Part of being an expert is knowing the language you're working with, and knowing the limits of your tools. When you update GCC and they add some bonkers optimization strategy that introduces new undefined behavior, you should know about that. Even experienced "Rust kernel wizards" will make mistakes. You'll see.