3 ms·
This is useless syntactic sugar unless there is a forward compatible ABI with comes with it. That includes modules being able to use different versions of a dyn
by ttt123 12y ago
This is useless syntactic sugar unless there is a forward compatible ABI with comes with it. That includes modules being able to use different versions of a dynamically linked libstdc++, i.e. modules compiled with different compiler versions. Which will never happen given the resistance from compiler folks to agree on a standard ABI.
- pbsd 12y agoThere is talk of defining a stable ABI within platforms [1]. I'm not particularly fond of the current proposal, but there seems to be interest. We'll have to see how it plays out. [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4028 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n402...
- golemotron 12y agoThis. And the reason that C++ compilation is so painfully slow is that unlike languages who saw C++'s problems and corrected them (Java, C#), a C++ compiler can not glean definitions from compiled code. In Java, the compiler reads a Java file once, produces a class file and the class file contains all the information needed to compile other files that refer to its contents. In C++, the compiler has to read all of source declarations that are used by a compilation unit, over and over again. An arbitrary cpp file can transitively include tens to hundreds of header files. Modern C++ compilers can play caching tricks, but the model is intrinsically O(n^2) compilation rather than O(n) compilation where n is the number of source files.
- WalterBright 12y agoThere are a lot of reasons why compiling C++ is inherently slow, but one big one is having a text preprocessor implementing an entirely different language tacked on the front.