It has been a while since my last book review, but it is not because of a lack trying, instead I had a lot going on with another book and the look ups it spawned, but thankfully I’m getting to the end of that as well. In the meantime, to refreshen some of my C++ knowledge and to expand my horizons (C++17 and some C++20), I opted to make a small detour with B. Stroustrup’s newest book, A Tour of C++ (2ed). It is so new in fact, that I still had trouble acquiring it back in August, so I could only get my hands on it later in September. I managed to restrain myself from reading the entire book for a week or two after I received it, but recently I felt like having the need for a small break from that other book and related topics, so I just read it. Without further ado, here’s my small review as posted on goodreads.com. Please enjoy.
I bought this book to have a small, yet more or less complete reference to the most important C++ features to this date, and this book fortunately turned out to be exactly that. The author, as usually, starts with the basics, like types, scope, pointers and references, classes, namespace, etc., then slowly but surely dives into the more complex topics, such as templates, variadic templates, containers, I/O, algorithms, concurrency and more. If this structure seems familiar to some, it may be because this book closely resembles that of Programming, Principles and Practice Using C++ (also from Mr. Stroustrup). This book basically goes through the same topics with very similar examples as the other one, but without all the lengthy explanations. It really is just a quick reference with minimal explanations.
Also, the author was very careful not to draw lines between old and new features of the language, so you will almost never find explicit mentions of the existing standards. Even the newest C++17 features were blended in so well, that one could think that they were part of the language from the very beginning, so fortunately this isn’t a “C++11 plus whatever came after” type of book, but instead, it is more like “This is what C++ resembles today”. Moreover, because it occasionally presents some planned features for C++20 (modules, concepts, contracts, etc.) and gives a heads up on what was/is to be deprecated, one can also formulate an educated guess about where the language is headed right now. Finally, for those who worry that this book’s usefulness will be limited by not being able to discern what feature came from which standard (because not everybody has access to a fairly recent compiler), the author provides a very thorough list precisely about this at the end of the book.
This book is of course not for everyone, since it mostly contains only a review, or as the title suggests “A Tour” of what the language provides, and it does so without any lengthy explanations. This general approach might pose a problem to those who are unfamiliar with C++, because there simply isn’t enough information to get deeply acquainted with the topics mentioned. Obviously, this was a conscious decision from the author’s part to keep this work within boundaries (it is still well over 200 pages) and because there are entire books dealing with some of the chapters (templates, algorithms, concurrency, etc.). Thus, if you are looking for something from which you can learn C++ or some parts of it profoundly, then this book isn’t for you. In this case you should go for Mr. Stroustrup’s Programming, Principles and Practice or The C++ Programming Language, depending on your experience level. On the other hand, if you are already familiar with most topics and only want to have something you can grab quickly off the shelf when stuck, this will come in very handy. Thus, all in all, I think this book turned out to be exactly what the author intended, and what I expected of it.