3 ms·
...wouldn't it be cool if we jammed this into our already overly-bloated standards document?" I think C++ gets the most flack for being too complex and bloated
by frankzinger 13y ago
...wouldn't it be cool if we jammed this into our already overly-bloated standards document?"
I think C++ gets the most flack for being too complex and bloated. But when you compare it to Java and C#, C++11, the language (based on language specification word/page count), is smaller than Java and only a little bigger than C#. The C++11 standard library is much smaller than both the Java 7 SE and the .Net (FX only) libraries.
Source: http://media.ch9.ms/ch9/5c51/d30749f7-09d7-4266-bd57-d1d446165c51/GN13HerbOneCpp_mid.mp4 http://media.ch9.ms/ch9/5c51/d30749f7-09d7-4266-bd57-d1d4461..., just after 15 minutes in. Or http://view.officeapps.live.com/op/view.aspx?src=http%3a%2f%2fvideo.ch9.ms%2fsessions%2fgonat%2f2013%2fGN13_Sutter.pptx http://view.officeapps.live.com/op/view.aspx?src=http%3a%2f%..., slide 14 and 15 (see the top-right corner of slide 14 for the metrics used for the comparison (page/word count of the language specs). EDIT, for context: the speaker/author referenced is Herb Sutter, member of the C++ standisation committee, and one of the authors of the graphics proposal in question.
- Daishiman 13y agoYeah, but you can actually understand what is going on in Java pretty quickly and get the weird corners cases on Stack Overflow. By contrast, C++ requires that the user understand most of the minutiae, details, corner cases, and weird things that the language describes just to get a rather low level of competence. The length of a language spec has little to do with its usability.
- 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.