Live data from Hacker News

Ask HN: How to refresh on modern features of C++?

news.ycombinator.com

61–63 of 63 posts

Re: Ask HN: How to refresh on modern features of C++?

#62
post #11

Earlier quoted context omitted.

Not 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.

Scott'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 t…

"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).

Re: Ask HN: How to refresh on modern features of C++?

#63

Well at the risk of stating the obvious, there's a lot of armchair programmer style "read this", "watch this" instruction here. It's much better to do something concrete. Go and do a trivial project in it, cppreference.com and cplusplus.com have c++11 tags on the new features. I'm sure you've had ideas recently and I'm sure the project is less trivial than you thought! I think looking at language features first is "a…

I think the correct approach is a mix. I firmly believe that one of the things that makes good programmers good is developing the correct habits. Once something has been ingrained as a habit you don't even think about it any more and just do it.

I'd take a book like Scott Meyer's new Effective Modern C++ book (which I recommend) and focus on applying one item every week. At the start of the week read through the item. Every time you write code for that week make an effort to see if that item applies to what you're doing. Maybe read the item again midweek or towards the end of the week to see if the practical experience changes your view on what he wrote. The book contains 42 items so if you go through it like this you'd be done in less than a year.

I'm not saying that people shouldn't read the whole book at once. However, if you just read it through once and put it on the shelf I don't think you'll get the same benefit that you would get from spending time focusing on individual areas.

Post reply on HN