3 ms·
C++ isn't terribly large. The current language, i.e. the standard excluding the standard library, is about ~700 pages. Smaller than Java. The standard library,
by nly 11y ago
C++ isn't terribly large. The current language, i.e. the standard excluding the standard library, is about ~700 pages. Smaller than Java. The standard library, as of C++14, is also tiny (but growing rapidly)
Imho, the perception of C++ as a large language comes principally from the high combinatorial complexity of its feature-set. It is very much a toolbox language. C++ advocates have only just recently started preaching a collective 'Pythonic' or 'Rubyist' way ("modern C++"). It is, however, still very much a broad church, with less philosophical baggage than many other languages. Strong and differing opinions on the committee seem to keep a single dictatorial programming style from emerging.
Tbh, I don't know what the author is worried about. Does Javascript have an overriding mindset/philosophy that is being eroded? Is that the concern? Other concerns about implementations not keeping up don't seem well-founded.
- wuch 11y agoIf I were to compare complexity C++ and Java, I would say that the former is much more complex and intricate than latter. Complexity of both of course keeps increasing. But, that does not necessarily mean that programming in any of them is getting more complicated. Argument is often made, for example by Stroustrup himself, that while language is getting more complicated, using it is getting easier and more intuitive. This argument seems to have some merit. Going back to C++ / Java comparison, lets have a look at some objective and subjective metrics. I am analyzing "The Java Language Specification - Java SE 8 Edition" and "Working Draft, Standard for Programming Language C++ N4527", in case someone would like to repeat this exercise. The Java specification has 780 pages, C++ standard has 1367 pages. Of course there are quite a few objections to be made about this comparison. First, if you open both standards side by side it is quite clear that typesetting and margins are quite different. Java has wider margins and a bigger font. So as a next step lets have a look at number of words. I converted both PDFs to text using pdftotext and counted number of words using 'wc -w'. This gives 227958 words for Java specification, and 477719 words for C++ standard. But that is still hardly fair. C++ standard contains description of standard library, Java specification in general does not (partially it does specify Object, Class, Thread, and some of exceptions, but lets ignore this issue). How many pages of C++ standard constitute description of standard library? I would say that all from "17. Library Introduction" up to "30. Thread support library", additionally including "Index of library names". Those constitute 777 pages, leaving only 590 for description of C++ language itself. That would be less than Java specification, but if we go back to word metric, this gives us 249186 words for C++ standard, a little bit more than Java, but not much. From more subjective perspective, I would say that Java specification is written using much simpler language, but that does mean that it is less precise. Moreover it seems to me that Java specification contains more non-normative text than C++ standard does. I would also say that reading Java standard from front to back doesn't seem to be very challenging (with small exceptions like overloading, which seems to be one of most complex parts of Java). And when I write 'reading', what I am really mean is reading and understanding. On the other hand I would never said similar thing about C++ standard. Understanding C++ just by reading standard seems almost impossible, as most of commentary and useful discussion is contained elsewhere: in proposals and defect reports.
- camgunz 11y agoAre you serious? Even if we stipulate that Java is as big or bigger (I don't think anyone would say Java is more complex), what other mainstream language is as large or as complex as C++?
- nly 11y agoI said it wasn't large, not that it wasn't complex ;)