News for hackers. Stuff that matters.

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

I have experience with a bunch of 'higher level' languages (Erlang, Elixir, Ruby, JS, PHP, Clojure) but haven't used C or Java in any non-trivial way. What's the best way to learn C++ in a pragmatic way today?

I'm looking for something hands on (either a book or online).

I particularly like Pragprog's approach to learning, but can only find one book 'Modern C++ Programming with Test-Driven Development' - this seems more about TDD than C++ though.

FWIW I'm interested in learning C++ for use with the JUCE framework, in relation to building audio software and VST plugins

( 7 comments | 14 points | on HN )
Re:Ask HN: Best way to learn 'modern' C++? by alstrex on Sunday May 08, 2016 @12:45PM (#11654661)
Here are some general books for getting up to speed with the C++ language itself:

-Programming Principles and Practice using C++ 2nd edition (by Bjarne Stroustrup). This covers everything, although is a bit dry at times.

-Effective C++ (by Scott Meyers). A bit "outdated" from a language standpoint, but many of the techniques still apply and also, not every C++ codebase is using the latest and greatest anyway.

-Effective Modern C++ (by Scott Meyers). A new set of "best practices" for a more modern C++ environment

I haven't found many good resources for JUCE other than reading through the JUCE forums, the project doc (often lacking), and reading examples. What is often helpful is to first understand C++ a bit, then learn the audio specific code and underlying DSP principles in a C++ context. Then it shouldn't be too hard to transition to JUCE on your own. The best books I know for this are:

-Designing Software Synthesizer Plug-Ins in C++ (by Will Pirkle)

-Designing Audio Effect Plug-Ins in C++ (again by Will Pirkle)

Re:Ask HN: Best way to learn 'modern' C++? by zensavona on Monday May 09, 2016 @04:01AM (#11658216)
Thanks so much for those very specific book recommendations! I'm working through "Discovering Modern C++" by Peter Gottschling which I'm finding pretty good. Those two books by Will Pirkle sound great and are now on my to-read list, I did some Googling before for audio specific C++ books but didn't come across them.

Also I've found some of the talks from JUCE Summit to be quite insightful.

Re:Ask HN: Best way to learn 'modern' C++? by olavgg on Saturday May 07, 2016 @05:37AM (#11648974)
I'm currently learning C/C++ by just jumping into it, reading, trying, failing, (some swearing!) retrying and so on! It may not be the fastest or the most efficient path of learning, but at least I'm getting way better day by day.

What I really miss is some kind of partner to learn together with, that would be awesome and we could have a lot of good discussions.

Re:Ask HN: Best way to learn 'modern' C++? by nivertech on Monday May 09, 2016 @05:05AM (#11658409)
What do you mean by "modern C++"? C++11, C++14 or C++17? There are older book that a word "modern" on a cover, but they cover old-style C++ with template meta-programming.
Re:Ask HN: Best way to learn 'modern' C++? by walterclifford on Thursday May 05, 2016 @07:42PM (#11640575)
Might have better luck asking this in https://www.reddit.com/r/cpp/
Re:Ask HN: Best way to learn 'modern' C++? by bejrut on Friday May 06, 2016 @08:41AM (#11643532)
checkout Scott Meyers "Effective Modern C++" book, and his talks with same title. It's also worth looking at his older books from "Effective" series.
Re:Ask HN: Best way to learn 'modern' C++? by dhoerl on Sunday May 08, 2016 @09:52AM (#11654058)
Bjarne's book on C++ - the newest - is pretty good IMHO.