Sunday
May062007
Building Large Systems in C (and C++)
Sun 2007-05-06
From Steve Yegge's old Amazon blog:
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.
Reader Comments