12 ms·
C++11 FAQ
- 72deluxe 10y agoGood stuff, I can also heartily recommend Scott Meyer's Effective Modern C++ book which covers idiosyncrasies and some unexpected behaviour (at least to me). Also Stroustrup's 4th edition of The C++ Programming Language is invaluable, if not just for the more-readable sans-serif font compared to the 3rd edition! And of course the coverage of all C++11 changes in it... I can also recommend the Overload journal for interesting C++ articles (https://accu.org/index.php/journals/c78/ https://accu.org/index.php/journals/c78/) And cppcon videos on YouTube - there's a wealth of info there, free. Also the ISO CPP FAQ (which I think supersedes Stroustrup's?): https://isocpp.org/faq https://isocpp.org/faq
- cmrdporcupine 10y agoI need to figure out what to do with my expensive old hard cover addition of the (C++98) C++ Programming Language. It just sits there looking sad. Not much value in it anymore.
- HelloNurse 10y agoIt's a monument to progress; for maximum artistic and educational value, place it where you see it every day on top of decorative obsolete hardware (I recommend the Thinking Machines CM-2 for prettiness or SGI workstation for historical value).
- readittwice 10y agoI started to read into "Effective Modern C++" but it seemed the book (or at least the beginning) focused too much on obscure edge-cases of C++ for me before I stopped reading. "Effective C++" didn't feel that way for me and many tips were useful on a day-to-day basis. Is this just me or did you have a similar experience? I read those books quite some time ago so my brain could also wrong me here...
- 72deluxe 10y agoI noticed there were many edge cases in it but it happened to cover a lot of issues inside some C++11 code I'd written and I find out it quite enlightening, particularly the section regarding reference collapsing, type deduction and the bit on threading really not working like you would expect. I have not read the previous ones so not really sure on the style difference with them. I wonder if it depends on the sort of code you were writing - I was making use of std::thread and incorrectly assuming a certain behaviour.
- huhtenberg 10y agoI've been programming for money for over 20 years and I grew up professionally writing C and then half-migrating to C++, because the latter very naturally captured lots of C patterns and allowed for more succinct expression of the same. It was lean, expressive and elegant. Just needed a bit of Lisp-y closures and it would've been perfect. And then things got completely out of hand. Elegance was nuked from the high orbit in favor of "power features" and abstraction. Fucking Boost (I can't tone it down, sorry), move semantics, ass-backwards closures, meta-template programming - C++ that was easy to understand became something that would normally come out of self-indulgent academic research. Again, I've been using C/C++ for all my professional life, so it pains me to say this, but what it has become, it's... it's just horrible. Anything - C, D, Python, Rust - is cleaner and more elegant than C++ and just as powerful. If nothing else, I feel sorry for Bjarne. What could've been a gem of programming languages became http://i.imgur.com/1oGHYqi.jpg http://i.imgur.com/1oGHYqi.jpg
- utopcell 10y agosome of the pain points you refer to, esp move semantics, bring a lot of additional performance to the table. Would you feel the same way about C++ if you started now and only had to learn a clean C++11 subset going forward ?
- maxlybbert 10y agoI've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.
- speedkills 10y agoMaybe they don't bother. PSU is still teaching C++98.
- maxlybbert 10y agoThat was the thing: starting with C++98, I was able to pick up C++11. But starting from scratch? I'm not sure.
- gumby 10y agoInteresting to see the love/hate. We are just starting a new blank slate code base and decided to go straight to C++17. We need expressivity early on, high performance later. And a model where someone can really get high performance on the core and still let people prototype / experiment down the road. It's pretty well supported by gcc & clang which are the compilers we care about. I haven't really done much C++ programming in 20 years so approached it as a brand new language (to me) that I'd never used before. It's a big but powerful standard. I can't say I adore the syntax, but it's subject to path-dependent constraints that you just have to put up with. I'm still looking for good references to style and practice that are appropriate to the latest C++. Books targeted at C++11 are pretty useful but it's too early to have more than the standard to help with 1y features.
- lossolo 10y agoSummary of C++17 changes: http://www.bfilipek.com/2017/01/cpp17features.html http://www.bfilipek.com/2017/01/cpp17features.html Modern C++ Coding guidelines: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...