2 ms·
Just read the new edition of C++ Programming language by Bjarne Stroustrup ;) Some things are hard to come by in any shorter sources. And at times you have to
by shmerl 12y ago
Just read the new edition of C++ Programming language by Bjarne Stroustrup ;)
Some things are hard to come by in any shorter sources. And at times you have to dig into the standard.
An example of rather obscure thing in C++ which changed in C++11 (sequencing): http://en.cppreference.com/w/cpp/language/eval_order http://en.cppreference.com/w/cpp/language/eval_order
And another thing which can be pretty confusing without carefully reading the standard. Copy elision vs move constructors...
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n324...
§ 12.8 (Copying and moving class objects), #32 - 33
- jmount 12y agoNot to be disrespectful- but I want to learn more about C++ from anybody but Stroustrup. His writing (to me at least) always has the aspect of "nothing is wrong, and every compromise was picked correctly." I'd much rather read somebody like Meyers who will actually warn you away from some mal-features. And C++ is so large you really want a useful editorial view to any teaching.
- shmerl 12y agoFrom such books I liked "Thinking in C++" which is a good intro, but there is no up to date version and it's missing details.
- shawn-butler 12y agoScott's style is also to be quasi-entertaining. In my opinion he uses this style of pointing out the dark corners not to inform but to make the reader/listener feel a part of the "epic struggle" / journey dialogue. It seems to work quite well to sell books, consulting and as a pedagogical conceit and is worth emulating. Bjarne has never had such pretense and his writing also reflects his personal style. And he will tell you quite honestly that some distasteful aspects exist because C++ was a language created to be used (backwards compatibility is a feature, adding keywords/syntax only when necessary, etc) not that "nothing is wrong." Any rational discussion of programming languages is one of relative merits, applicability to specific problems, and personal prefs, rather than one of absolute truths.
- jmount 12y ago"And he will tell you quite honestly that some distasteful aspects exist because C++ was a language created to be used (backwards compatibility is a feature, adding keywords/syntax only when necessary, etc)" Even that line reads as: C++ may have some less-desirable features, but no mistakes (everything was an optimally chosen tradeoff).