top | item 2548145

(no title)

jfr | 15 years ago

> 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.

discuss

order

No comments yet.