4 ms·
Adding to your “no 'layers' underneath you that can screw up the timing” it is also valuable that if there is a performance problem in your application, you can
by sorbits 17y ago
Adding to your “no 'layers' underneath you that can screw up the timing” it is also valuable that if there is a performance problem in your application, you can address it.
You won’t ever end up having to just blame it on the garbage collector, the string buffer implementation, or even the memory allocator. For software which works with huge quantities of data or is interactive, every microsecond often counts.
That said, C++ offer the same advantage, and I am surprised that it doesn’t see more use. Maybe C programmers think like Linus Torvards: http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918 http://thread.gmane.org/gmane.comp.version-control.git/57643...
- jacquesm 17y agoI think that a big part of it is that C is simple. The thread of execution is dead obvious, it is almost - but not quite - like looking at assembler. In C++ you have more options to create interesting bugs, every operator has a potential side effect depending on the context. Sure that can be done in C too, but you have to work a little harder for that. When reliability - or lives - are at stake and plenty of systems software written in C controls mission critical stuff it helps to see what is actually going on. By sticking to a very simple subset you make it easier to find problems before they cause nasty accidents. I know of plenty of situations where even an OS would be a detriment, these run on totally stripped down kernels that probably the majority of programmers would no longer recognize as an operating system proper but would instead call a loader or something to that effect. C++ offers the same advantages that C does but it also offers a single disadvantage that C does not have, it's more expressive. In other words you can make your C code do lots of stuff but you will not be able to say it in roughly more than one way. In C++ there are endless ways to do the same thing. That means there is more to remember and that in turn means that programmer expertise is a much bigger factor in quality. I think systems level guys have learned the hard way that the KISS principle is the most important programming guideline there is.