6 ms·
But the main reason it's not as clean is because it has had to maintain backwards compatibility with C, which is 40 years old now. Ironically, had C++ been 'cl
by Jeema3000 16y ago
But the main reason it's not as clean is because it has had to maintain backwards compatibility with C, which is 40 years old now.
Ironically, had C++ been 'cleaner' and not as backwards compatible with C from the outset, then we probably would not be having this conversation today because no one would have ever adopted it. :)
- dantle 16y agoCan you give an example of removing some backwards compatibility with C that would make C++ cleaner?
- WalterBright 16y agoConverting static array references to pointers when passing them as a function parameter. The whole array/pointer conflation. C's struct "tag name space". Trigraphs and \ line splicing. Replace #include with symbolic import.
- ajays 16y agoI disagree. The reason it's not clean is because they threw everything including the kitchen sink into it. C is a very simple and elegant language. You can write down the specs for it on a dinner napkin. And implement a compiler for it overnight. C++, on the other hand? A fully compliant compiler for it took over a decade.
- danieldk 16y agoThere are counter-examples. Objective-C is a strict superset of C and a reasonably clean language.