Live data from Hacker News

Ask HN: Best way to learn modern C++?

news.ycombinator.com

31–40 of 184 posts

Re: Ask HN: Best way to learn modern C++?

#31
post #17

- Tour of C++ ( http://www.stroustrup.com/Tour.html ) - Principles and Practice Using C++ ( http://www.stroustrup.com/programming.html ) - From Mathematics to Generic Programming ( http://www.fm2gp.com/ ) - The Scott Meyers books Some of the Bjarne Stroustrup videos, "Learning and Teaching Modern C++" - https://www.youtube.com/watch?v=fX2W3nNjJIo Some of the Herb Sutter videos, "Writing Good C++14... By Default" - ht…

I'd add the CppCoreGuidelines to the list: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...

It's a lot of the content in the above but crowdsourced, open for PRs, searchable, and readable from the browser.

Re: Ask HN: Best way to learn modern C++?

#33

IMO, the classic C++ book/author is still the best: Effective C++. Don't forget about the sequels, including the mostly overlooked Effective STL (which I happen to like better than the first two books). And to address the modern part of this question, I'll add that Scott Meyers has written Effective Modern C++ as well, but I'd read that last after getting the hang of C++03. No matter what people say, I tend to believ…

IMO, Effective C++ is just a collection of warnings about pitfalls, something that is unfortunately needed for C++ programming, so do read it. But it is neither an introduction nor a collection of big picture advice.

Re: Ask HN: Best way to learn modern C++?

#34
post #12

Earlier quoted context omitted.

>replace C++ No one can replace it, but everyone has to try.

Rust is the first language I've seen that even has a chance though.

Languages rarely get replaced though. We are just adding to the pile.

Re: Ask HN: Best way to learn modern C++?

#35

May I ask why do you want to learn modern C++? You should check out Rust, it aims to replace C++ and do a better job in memory management, and developer experience in general (cross-platform compatibility, package management, etc)

I'm not the OP, but I'm tempted to learn more C++ so that I can directly use Qt without relying on language bindings for it. I like the idea of Rust, and maybe some day I'll tinker with it, but it looks like it has quite the steep learning curve.

First of all, I should say that I feel like bringing up Rust in this thread is inappropriate, and I’m glad the OP was downvoted.

To comment briefly on the learning curve, the trade off is basically, C++ is easier to get started, but harder on the high end. Rust is a bit harder for C people to get started, but then the high end is much easier. Rust’s curve is flatter, in a sense.

Oh and also: learning one will certainly help you learn the other in many cases. I advocate learning many languages :)

This week I’m visiting a ~700 person company in London that’s moving away from C and towards Rust. They’re not doing a Big Rewrite, obviously, so they still have quite a bit of C too. They chose Rust over C++ though. It always depends!

Re: Ask HN: Best way to learn modern C++?

#36
post #12

Earlier quoted context omitted.

>replace C++ No one can replace it, but everyone has to try.

Rust is the first language I've seen that even has a chance though.

Yup. D had a shot, but they screwed it up with (effectively) mandatory garbage collection.

Ada also had a shot, I think, but they screwed it up with no C compatibility and expensive SDKs - or something. For some reason, Ada is just not perceived as "cool". It actually seems like a pretty good language!

Re: Ask HN: Best way to learn modern C++?

#37
post #13

May I ask why do you want to learn modern C++? You should check out Rust, it aims to replace C++ and do a better job in memory management, and developer experience in general (cross-platform compatibility, package management, etc)

Rust still needs to catch up with C++ in a few domains. SIMD, GPGPU, GUI, embedded platforms, iOS, Android, UWP, COM, certified compilers, ...

Incidentally, SIMD is just waiting on stabilization now; it’s RFC was accepted and the implementation landed. Soon!

Re: Ask HN: Best way to learn modern C++?

#38

IMO, the classic C++ book/author is still the best: Effective C++. Don't forget about the sequels, including the mostly overlooked Effective STL (which I happen to like better than the first two books). And to address the modern part of this question, I'll add that Scott Meyers has written Effective Modern C++ as well, but I'd read that last after getting the hang of C++03. No matter what people say, I tend to believ…

IMO, Effective C++ is just a collection of warnings about pitfalls, something that is unfortunately needed for C++ programming, so do read it. But it is neither an introduction nor a collection of big picture advice.

I usually recommend Effective C++ as the C++ book that everybody should read second. I'm still not sure what the best book to read first is, though...

Re: Ask HN: Best way to learn modern C++?

#39
Best way to learn anything new, is just pick a pet project you've been thinking about, and implement it in that language/database/system/whatever. That's how I've always done it over the years. You end up constantly building upon the last projects knowledge.

Re: Ask HN: Best way to learn modern C++?

#40
post #34

Earlier quoted context omitted.

Rust is the first language I've seen that even has a chance though.

Languages rarely get replaced though. We are just adding to the pile.

Only in a very strict interpretation that everything that is still used somewhere didn't get replaced. Perl was more or less replaced, for example, and I like that. The only kind of originality that is good in programming is "surprisingly simple". "Surprisingly weird" is terrible.
Post reply on HN