6 ms·
I think the article stays away from a criticism of C++ as a language (being politically correct, perhaps?). Despite knowing most of the answers to the interview
by arocks 14y ago
I think the article stays away from a criticism of C++ as a language (being politically correct, perhaps?). Despite knowing most of the answers to the interview questions in the article, I think I wouldn't call myself an expert C++ programmer. The spec is extremely large and daunting. C++ is today the biggest "design by committee" language.
C on the other hand comfortably fits in my head. It might be possible to declare several complicated declarations (especially with pointers) but the language is still largely readable. I would argue that many of the extensions that C++ provides over C feels bolted on (as it was originally) and still not organically part of the language.
The addition of classes and objects in C++ was seen as the most significant addition to C. But over time, I have learnt that sophisticated static type systems like that of ML or Haskell are much more useful and expressive.
At the end of the day we don't need a C on steroids with every feature on the wishlist and a 2000 page reference manual. We need an easy to use expressive systems language. I would rather call it "C with some chosen features" rather than "subset of C++".
- jacquesm 14y agoGo appears to be aiming straight for that spot.
- tonyedgecombe 14y agoAnd I hope it makes it. Whenever I write C++ I spend far too much time thinking about the language and not enough thinking about the problem I'm trying to solve.
- jjtheblunt 14y ago"the biggest "design by committee" language" : facts? Bigger than Common Lisp?
- seabee 14y agoHow long is the spec for CL? It surely is a tenth of the C++ spec.
- jff 14y agoIt's a pretty damn thick book.
- riffraff 14y agowell the Common Lisp HyperSpec is, per wikipedia, "approximately 15MB of data in 2,300 files which contain approximately 105,000 hyperlinks". If this[0] is a valid copy of the spec and my calculation is right [1] then it's 1360 pages. Seems a lot, but I have no idea what the length of ANSI standards is. [0] http://quimby.gnus.org/circus/cl/ansi-cl/ http://quimby.gnus.org/circus/cl/ansi-cl/ a draft but i think close to the final thing [1] for i in `ls *.ps`; do gs -q -dNOPAUSE -dBATCH -sDEVICE=bbox $i 2>&1 | grep -c HiResBoundingBox; done | awk '{ sum += $1 } END { print sum }' , and each ps page is actually two
- jules 14y agoThe CL spec is about 1000 pages printed, C++11 around 1300, but the CL spec is written in a more verbose style AFAIK. The R5RS Scheme specification is 50 pages.
- muuh-gnu 14y ago> The CL spec is about 1000 pages printed The spec covers not just the language itself, but the whole standard library. > The R5RS Scheme specification is 50 pages. And with those 50 pages, you can not do anything useful out of the box. Yeah, you can solve SICP excercises, but thats essentially it. All useful features are implementation specific, and the Scheme ecosystem is more fragmented than the Balkan. Scheme code is essentially non-portable amongst the 1001 existing implementation. You dont write "Scheme" directly. You write code either for "Guile" or for "Chicken" or "Bigloo". PLT doesnt even call their implementation Scheme any more, they call it Racket. You dont write Scheme, you write Racket. This leads to the question of why a standard was nescessary at all, if youre not standardizing a critical amount of features to enable portable code.
- Someone 14y ago"Common Lisp, the language", second edition, starts its appendices on page 923, its references on page 972 and ends on page 1027 (with an index of over 50 pages) "The C++ programming language", third edition, starts its appendices on page 791, its index on page 869, and ends on page 910. Both use about the same line spacing; the C++ book is about 10% wider and its lines are about 15% longer. It also has fewer comparisons with older omplementations such as MacLisp and Lisp Machine Lisp, and maybe a tiny bit less verbose. I do not think either is THE standard, but they should be representative. So, there is nowhere a factor of ten. Common Lisp is large partly because it has everything you would ever need (print the integer 4 as 'four', as 'fourth', as 'IV' or as 'iiii'? You got it. Pluralizing strings? You got it). The loop macro (a for loop on steroids, with all its positive and negative effects)? 38 pages. Pretty printing? 22 pages.