3 ms·
A more fair comparison: the drafts of the ISO C and ISO C++ standards on my system (both from 2011) are 701 respectively 1325 pages, of which 180 respectively 4
by Someone 11y ago
A more fair comparison: the drafts of the ISO C and ISO C++ standards on my system (both from 2011) are 701 respectively 1325 pages, of which 180 respectively 410 describe the language, and the remainder the support library.
That difference isn't as large as I would have expected. Part of that may be style or formatting; C++ seems to have about a third more lines per page and smaller text, so I guesstimate it has about 50% more text per page. Looking at the descriptions of the preprocessor that seems about right; C needs 19 pages to do that, while C++ manages it in 13.
That would make the C++ language description about 3 times as long as that of C.
- gjm11 11y agoThe difficulty of learning and using a programming language increases (all else being equal[1]) faster than linearly with the size of its spec, because much of the pain comes from the interaction of one feature with another. If we handwavily suppose that difficulty goes like size squared (perhaps every pair of features generates a possible interaction you have to understand) then a description 3x longer makes for a language more like 10x harder. [EDITED to add:] Which feels about right to me for the relationship between C and C++. [1] Of course there are exceptions; some "Turing tarpit" languages like Brainfuck can be completely specified with very little text, but are difficult to do anything useful with because they are stripped so very bare.