Sunday, May 6, 2007 at 2:26PM
If you're trying to build a large system in C, you'll inevitably wind up making a choice between two alternatives:
Most companies choose the second option, usually because they haven't learned the hard way that 90% of your code never needs to be optimized, and doing so won't produce any human-observable difference in runtime performance.
- Use the AlternateHardAndSoftLayers design pattern, in which you write most of your code in a high-level language, and the performance-critical parts in optimized C.
- Try to make C a high-level language itself, which either leads to the madness of choosing C++, or the madness of implementing your own high-level language in C, without any actual syntactic support.
Indeed. The use of C++ for the whole of a large system can be seen as a 'premature optimization' in the sense of Donald Knuth.