ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1949 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
Generic Programming and the STL
Author:
Matthew Austern
ISBN:
0 201 30956 4
Publisher:
Addison-Wesley
Pages:
548pp
Price:
$49-95
Reviewer:
Francis Glassborow
Subject:
advanced c++; object oriented
Appeared in:
11-2
I have to confess to a certain amount of bias in my review of both this book and the next one (Multi-Paradigm DESIGN for C++). In both cases I know the author and hold both of them in high regard for their technical expertise.

Matt Austern is a new comer to the world of book-authorship though he has honed his writing skills by writing articles for technical periodicals.

There could never have been any doubt about Matt's technical knowledge and after reading this book there could be no doubt about his writing skills. That already places him in a tiny elite writers who write well and know what they are writing about.

Many authors when the first write a book stick on safe terrain by writing for novices, or writing a typical academic book on algorithms and data structures. There is a sense in which this book might fit into the latter category but to describe it in those terms would be doing the author a grave injustice.

What he has done is to focus on a relatively new paradigm (of course we can trace the ancestry back a couple of decades) of generic programming. Just as Smalltalk focused programmers on the concepts of object-orientation, the development of the Standard Template Library in C++ has highlighted another way of writing programs. The ideas of generic programming are to concentrate on the underlying structure with as little regard for the exact types as possible. A second important idea is to separate data structures from the algorithms that work on them. In this way we can not only generalise for types but also for data structures. Lists, deques, vectors etc. share some properties while differing in others. Many programs will work with a choice of different containers. Containers themselves can use different resource allocation methods and so on. Generic programming works by abstracting commonality and encapsulating it in templates.

If we are to successfully decouple algorithms from data structures we need some form of glue to manage the interaction. This is provided via iterators and traits. Both these are families of related concepts. In the first part of this book Matt carefully explains the fundamental concepts and what their realisation in templates offer us. This part should be compulsory reading for all programmers who have stepped out of the nursery.

The second part of the book is a comprehensive description of the STL as it is today together with copious detail that will allow help you write your own extensions. Of course you will find numerous extensions in the text, such as hash-tables and adaptors to provide such things as hash_map.

I could go on but I will just conclude by re-iterating my belief that this is the C++ programming book of 1998. I doubt that any but the most expert of programmers could fail to benefit from reading this book (though you need to understand the basics of programming in general and the specifics of C++)