What’s C++ like?
-
Whoever said Perl looks like line noise should take a look at ‘modern’ C++.
-
C++ is still a requirement for many engineering/number crunching jobs, so it's still worth learning.
-
It mashes so many things together that it is like a huge revision of everything you have ever learnt about programming. The fact that you are encouraged to write your own memory mangement abstractions makes you think hard about resource management; more so than with plain C.
-
Despite the line noise and the mysterious compiler messages, I quite like generic programming.
Unfortunately, there aren’t that many Open Source projects one can learn ‘modern’ C++ from. Those that do use C++, mostly use the C-like part of the language, with some simple classes or… namespaces! (node.js, mongodb).
Good books to learn C++ from
You cannot make a list of C++ books without mentioning ‘The C++ Programming language’ by Bjarne Stroustrup. I find this book is better as a reference than for learning the language. You might also wait for the fifth edition covering the new standard before committing the shelf space. Meanwhile you can easily browse it on services such as Safari.
Personally, I have started with Accelerated C++ by Andrew Koenig and Barbara Moo. It covers the template library and best practices straight away, and is really an excellent book. It is quite dense though. Don’t let the title mislead you; this is not one of those ‘Learn C++ in 7 days’ books.
The next book could be Effective C++ by Scott Myers. It covers common mistakes and ways to improve your code. The only problem is that if you’ve read through Accelerated C++, you will find Myers’ book covers much of the same ground. Nevertheless, it is a book many have learnt their C++ from and it is good to keep it in mind.
What I have really liked so far is Herb Sutter’s Exceptional C++. I think the title is a pun on making C++ code ‘exception-safe’. The book really illustrates a lot of dark corners of the language and offers advice you will only find there. The material is presented as a set of problems you can try to solve on your own before checking Herb Sutter’s solution. There is also ‘C++ Coding Standards’ by the same author (with Alexei Alexandrescu), but that book covers a lot of language agnostic material (’Use a revision control system’), and is in my opinion less interesting.