6 ms·
Hearing that C has assists for program correctness is, shall I say, unexpected to say the least. What kinds of things are you referring to?
by vsnf 3y ago
Hearing that C has assists for program correctness is, shall I say, unexpected to say the least. What kinds of things are you referring to?
- ignoramous 3y ago> What kinds of things are you referring to? Pointer arithmetic, I imagine. Elementary math after all.
- eddd-ddde 3y agoProbably the things C does not do? No messy vtables, no exceptions, no vm, etc. If you just do less stuff it's less likely you do something wrong.
- elteto 3y agoYou trade that off by a healthy dose of foot guns and UB. And a non-existent standard library that encourages NIH write-my-own for the most common data structures. C barely does anything and it has a stark beauty of its own, agreed. And yet it is incredibly hard to write secure code with it.
- af3d 3y agoDeveloping robust programs in C just requires a clear understanding of the language itself (and of course a good overall skill set as a programmer). I have been writing (mostly) bug-free code in C for over twenty years. My only real complaint is that it forces you to write lots of "boilerplate". Beyond that, it is a fine language for systems programming (provided you know what you are doing). I have had many more issues working with scripting languages (I'm lookin' at you, Java and Ruby!) where the bugs existed not in my program, but in the VM itself. Having said that, I do enjoy working with higher-level abstractions.