3 ms·
These are trivial issues compared to major safety and usability flaws inherited from C that I mentioned. BTW the C grammar is not context-free either. The compi
by vitaut 11y ago
These are trivial issues compared to major safety and usability flaws inherited from C that I mentioned. BTW the C grammar is not context-free either. The compilation speed is mostly due to header system which is again a C heritage, not because the C++ grammar is undecidable. And template error messages are much better now in modern compilers such as Clang. As for the const, its semantics is the same as in C.
- the_why_of_y 11y agoThe super-slow compilation speed is mostly because C++ encourages massive all-inline template libraries like the standard C++ library and boost, which need to be parsed and have the used templates instantiated for every compilation unit. Here's idiomatic hello world, with <iostream> vs. <stdio.h> > g++ -E hello.cc | wc -l 17906 > gcc -E hello.c | wc -l 842