4 ms·
>But when you compare it to Java and C#, C++11, the language (based on language specification word/page count), is smaller than Java I watched the presentation
by edmccard 13y ago
>But when you compare it to Java and C#, C++11, the language (based on language specification word/page count), is smaller than Java
I watched the presentation where Herb Sutter said that, and I think that claim is disingenuous, because the Java Language Specification is much wordier than the C++ spec.
For example, the section on integer literals in the JLS is 1.5 times longer (measured by word count) than the same section in the latest C++ draft. Is it because Java's literals are more complex than C++? No, it's because of things like explicitly listing the minumum and maximum numeric values of int and long literals (in each of decimal, hex, octal and binary)
In general, I think that the terseness of the C++ spec is not a good measure of the relative simplicity of C++.
- frankzinger 13y agoWell I think the idea is that it is a good general metric which should average out over thousands of pages. Just because one section of the Java language spec is wordier than the corresponding one in the C++ language spec does not mean it holds for the entire document. But I concede the point of complexity; the C++ spec is no doubt more dense. I just don't think it deserves to always be singled out as the most overly-complex/bloated language. The difference is not as big as the cliche would have people believe. Also, the article is about adding to the standard library, which is much smaller than Java's and .Net's, so invoking bloat is probably not appropriate in the context of the article.