Scripting languages today are incredibly useful and certainly varied. Perl, Python, shell scripting, etc. These are all incredibly useful tools that I use on a daily basis. But I have to admit, my heart lies with traditionally compiled languages. A lover of Pascal, alas, the world has moved past Pascal to the point where I feel I have no choice but to embrace C++ nowadays for my compiled code fix.
Recently I heard about the new standards release for C++. Since I’ve been away from C++ for many years, and indeed was never all that deep into it (I preferred Pascal, and back then a company called Borland produced THE Pascal compiler of dominance), I wanted to see how the years have treated C++.
In the spirit of full disclosure, I was never C++’s biggest fan. I have always maintained that C was a great language if your alternative was assembler, but I always felt that C was over used at higher levels of programming. Large scale application development in C seemed like trying to do arithmetic in roman numerals. Well, actually it seemed to me to be much worse than that. C++ always seemed like it was “tacked on” to C, and thus I wasn’t overly fond of it.
So when I decided to refresh my understanding of C++, I wanted to find a source that would give me more than just the language facilities. I wanted a book that could explain how the philosophy of the language had evolved over the years, and how the language features should be used. In addition, I wanted a solid reference for the language along with a light tutorial of the newer features. I had seen Bjarne’s new book advertised for advanced sale on Amazon for many months. I toyed with the idea of buying an already available book both because of cost and because I was afraid that, like many technical people, Bjarne might not be able to write worth diddly. However, I read reviews of his previous editions and decided I’d take the risk and wait for this particular book to be published. Boy did I hit pay dirt.
The C++ Programming Language (4th edition) by Bjarne Stroustrup is absolutely a gem of a book, and I highly recommend it to anyone, but especially for people like me who have been away from the C++ scene for a long time and want to see how the language has grown. In case you don’t recognize the author’s name, Bjarne is in fact the man credited with designing/creating the C++ Language.
In a word, I think this book is GREAT!
While I have been reading the book casually (Solr, which I use at work, has been dominating my study for quite some time as I’ve been trying to come up to speed with it), I am already impressed with its content. It is thus far EXACTLY what I have been looking for.
Bjarne’s book is worth every penny in my opinion as it not only details the language features (old and new), but gives you the kind of analysis and comparison of features between the current C++, the older versions of C++, and other languages that you would only expect from a man who has spent the greater part of his professional career in the design of the language.
A small example (and really one of the smallest) is a tidbit that Bjarne leaves for us on page 862 of the book: “A standard library is not merely required to perform its tasks. It must also perform these so efficiently that users are not tempted to supply their own alternatives to what the standard offers. Otherwise, implementers of more advanced features are forced to bypass the standard library in order to remain competitive.”
On the surface this seems like a rather innocuous statement. However, when you ponder it carefully, these three sentences demonstrate a subtle insight into the design and use of language features that you don’t ordinarily find in lesser mortals. Time and time again in this book (of which I have only made it through about 25%) I find such insights and background as to WHY certain language features are present, the evolution of those features in cases where they’ve seen change over the years, and also a clear discussion of programming practices and classes of problems that the specific features were designed to solve. Indeed, you discover in reading this book that nearly (or perhaps every) feature of the language has very specific design goals and intended uses, and Bjarne has done an excellent job in pointing all of this out. So much so that I have abandoned my misinformed notion that C++ was simply C with a bunch of additional features tacked on.
Now I don’t know about you, but for me, after reading the previous paragraph, I’d be afraid that the book is filled with all sorts of self-aggrandizing drivel that I have to wade through just to figure out how a new feature is meant to work. Nothing could be farther from the truth. With Bjarne’s age and experience I think he has done as good a job as can be done in balancing the presentation of material such that you can find what you want quickly and efficiently, but can also delve into these other aspects of the language if you wish. His writing is very concise and well organized.
In the beginning of the book, Bjarne writes about it’s layout, designing the book to be suitable for both a partial tutorial of the language and as a language reference. Many have tried to write books to satisfy both of these demands. I cannot ever recall reading a book that managed to satisfy both roles so well. This book pulls off its goal with incredible aplomb. Of course, the book *is* 1346 pages in length. He didn’t skimp on the content at all.
I don’t want this post to get too long, but once again I will emphasize that this book demonstrates what I have to believe is a personality trait of Mr. Stroustrup: I don’t think he does anything without a clear purpose or without considering his end goal. Both the book, and the language, seem to highlight this fact.
In a profession that is being increasingly dominated by young, energetic individuals who can crank out code and applications in the wink of an eye, I find it refreshing to read the insights of a man with possibly more language design experience than 99% of the general population. If you are anything like me, you will find this book both useful and a good read.
Thank you Bjarne Stroustrup: Thou Art the Man!