4 ms·
You should check out the new version of the C++ book by Stroustrup. After having stayed away from C++ exactly for the reason you speak of for probably 15 years
by shepardrtc 11y ago
You should check out the new version of the C++ book by Stroustrup. After having stayed away from C++ exactly for the reason you speak of for probably 15 years, I gave it another try. I was very impressed at how C++ has changed with 11/14. Stroustrup had to essentially rewrite the book.
Of course if you're simply comparing size, keep in mind that Stroustrup's book is aimed at beginners. And provides a thorough discussion of many things in the language. The C book is terse and not really aimed at beginners or students.
- irishcoffee 11y agoHmm, thats the C book I used in my intro to programming class as a first year EE major as UMD-CP. (If it matters, I later switched to Comp. Sci. because of that class) Why would it not be aimed at students?
- shepardrtc 11y agoBecause it doesn't teach programming, it teaches C.
- irishcoffee 11y agoUh, wat? If an EE and/or comp. sci. major can't grasp logic, they should not be in the class/major, and these classes are commonly referred to as "weed-out classes." "Programming" is derived from math (I'll provide source if you want), which is logical at its core. The keywords while, if, else, they're not hard to understand. I don't know what teaching "programming" means.
- deleted 11y ago[deleted]
- AnimalMuppet 11y ago> The C book is terse and not really aimed at beginners or students. I don't know about that. Knowing only a bit of Pascal (and Fortran and Basic, but they're less similar), I picked up K&R over a four-day weekend, and really understood it, without even a compiler to experiment with. (All except for argc and argv - had to try it out to see what was going on there.)
- dragonwriter 11y ago> The C book is terse and not really aimed at beginners or students. At Caltech ~1990 it was the textbook for the C programming course that was the usual first course in computer programming. And it seemed quite good in that role.
- shepardrtc 11y agoI tried to teach myself how to program using it when I was in high school and I didn't understand a thing it was saying. Like I've said elsewhere, it teaches C, not programming.
- Someone 11y agoA 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.
- ArkyBeagle 11y agoI'd say "The 'C" Programming Language" is definitely pointed at beginners and students. I am not sure why it would be surprising that something as ambitious as C++ would take this long to evolve into a better form. C++ has always been very useful, but it continues to get better, IMO.
- justwannasing 11y agoHmm. As an assembly language programmer, electronic engineer, who was forced into learning this new "high level language" by our MIT educated boss, decades ago, I can assure you that we were neither beginners nor students as we created the product most likely used on you and yours in hospitals everywhere.
- ArkyBeagle 11y agoI meant "... beginners and students in addition to experienced people." The posting I replied to seemed to think the book is not for beginners. I seem to have presumed carry over of a quantifier or range that wasn't clear :)