News for hackers. Stuff that matters.
Re:Surviving C++ by Jeema3000 on Sunday February 27, 2011 @12:51PM (#2268342)
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. :)

Re:Surviving C++ by ajays on Sunday February 27, 2011 @01:47PM (#2268497)
I 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.

Re:Surviving C++ by dantle on Sunday February 27, 2011 @01:30PM (#2268451)
Can you give an example of removing some backwards compatibility with C that would make C++ cleaner?
Re:Surviving C++ by WalterBright on Sunday February 27, 2011 @03:56PM (#2268930)
Converting 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.

Re:Surviving C++ by danieldk on Sunday February 27, 2011 @01:52PM (#2268520)
There are counter-examples. Objective-C is a strict superset of C and a reasonably clean language.