Title: Extended STL Volume 1
Author: Matthew Wilson
Publisher: Addison-Wesley 2007
Links amazon | publisher
This is an unusual book review for me. Normally, I digest a technical book in a matter of a week or two and then write a review. I don't like writing a review without having fully read the entire contents of a book; it's not a fair and representative review. Consequently this review is remarkably delayed as Extended STL has taken me literally months to read.
Why is this? The information in this book is dense and not easily digested. There's a lot of complex stuff in here that - especially in order to review fully - you really have to pay attention to. I'm not sure I can entirely blame this on the book, though. It's a natural consequence of the subject material.
What's it about?
Extended C++ is the first volume in Wilson's projected two part series. This tome covers collections and iterators. That is, it describes how to create STL-compliant containers and iterators from scratch or how to wrap existing pieces of code with STL-interfacable proxies. This is a non-trivial area, with many subtle problems. The meat of the book is an in-depth description of problems and solutions in the implementation of STL-like code.
Volume 2 of the series will cover (amongst other things) STL-like functions, algorithms, adaptors and allocators. No doubt that, too, will be a dense book covering complex subject matter.
Extended C++ is a fairly unusual book in the current marketplace, and so has little competition. There are many books on learning or using C++, on good C++ style, and on C++ programming idioms. There are many books describing particular C++ libraries. But there are few specifically about writing STL-like extensions, and interfacing existing code with the STL. So there's little competition for Extended C++. If you are doing this kind of stuff then the book looks like a sound investment.
So is it any good?
This book is not an easy read. It took me an incredibly long time to complete; it's not easy to read in small chunks, or when you brain is full of other stuff. You really have to study a chapter in depth from start to finish to follow the flow.
Extended C++ opens with a set of chapters on foundational concepts and terminology. These are a refresher in some important C++ STL-related techniques, and I suspect that the majority readers will take away the most useful stuff from these chapters alone!
The chapters in the subsequent two parts (collections first, then iterators) usually cover a single example of the implementation of a STL-like component: explaining the reason for writing the component, the problems discovered during implementation, and the ultimate solution. An included CD contains all the numerous code examples in the book.
Sometimes this example-driven approach makes it hard to determine the most important information presented in chapter. It also makes Extended C++ less than ideal as a reference-work to look techniques up in.
The book contains a scattering of "tips" in callout boxes. These appear to be a rather inconsistently applied narrative conceit. They should either have been scrapped or rationalised significantly.
As you read the text, it's clear that you are getting information from someone who really knows what he's talking about, and who has done a lot of this kind of legwork many times over. Wilson's writing style is clear although sometimes I wonder whether the information could have been presented better in a different structure.
Extended C++ is a testament to the incredible power and to the incredible complexity of the language. Many of C++'s detractors could cite it as a counter-example for use of the language!
I found very few technical problems or mistakes in the text. If I was being picky, I'd criticise the author's propensity for somewhat flowery language which will leave non-native (and some native) English speakers confused (or reaching for the dictionary).
- Fairly unique coverage of this aspect of C++ coding
- Clear writing style
- The voice of an expert
Recommended if you are writing STL-like C++ code, or want to interface legacy code with STL-style C++. Make sure you have plenty of time to sit down and digest the material, though.
- Dense information, often hard to digest
- Not ideal as a reference work