News for hackers. Stuff that matters.
Re:Why C++ is vastly superior to C by thedigitalengel on Saturday May 14, 2011 @12:20PM (#2547935)
Most of the points mentioned in that particular link pertains why both C and C++ are inferior to languages like LISP and Python which have garbage collectors, weak type system and the like.

The bitching about bad compile time errors has been mostly fixed in clang.

Then only _inconsistency_ (in the correct sense of the term) in C++ I am aware of is the unordered initialization of static objects. So if you have "class A { ... A () { } };" and have a "A foo;" declared somewhere with static linkage, it can be hard to pin down exactly _when_ that constructor will be called. It will be called before control is transferred to main, but you may want even finer control.

If you have noticed other inconsistencies I'd love to know.

Re:Why C++ is vastly superior to C by jfr on Saturday May 14, 2011 @01:45PM (#2548145)
> The bitching about bad compile time errors has been mostly fixed in clang.

Yes, IOW, it is a compiler problem, not a language problem. Because one particular compiler is horrible on error presentation doesn't mean that the language is bad.

> declared somewhere with static linkage, it can be hard to pin down exactly _when_ that constructor will be called.

The language doesn't define it on purpose. The language leaves it to be defined by the implementation because it goes a little beyond the purpose of the compiler. The compiler transforms C++ source into object code. You can have multiple objects linked together into a single binary, and this linkage is very platform and operating-system dependent. C++ is already horribly difficult to implement correctly; if the language were to define an order for static initialization, it would be stepping on the operating system domain, and make it even more difficult to implement on some systems.

Re:Why C++ is vastly superior to C by azth on Saturday May 14, 2011 @07:58PM (#2548896)
I guess that's why the Google C++ style guide lists using static non-POD types as a no-no. :)