Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Accelerated C++


June 2001/Accelerated C++


Title: Accelerated C++ —
Practical Programming by Example
Authors: Andrew Koenig and Barbara Moo
Publisher: Addison-Wesley, 2000
Pages: 336, softcover
ISBN: 0-201-70353-X
Price: $33.95

This review was originally published in C Vu 12.5, October 2000, a publication of the ACCU, a user group based in the United Kingdom. It is reprinted by permission of Francis Glassborow and the ACCU. For ACCU membership information, see www.accu.org.

This is the book that I have been waiting for, for far too long. I have probably become boring to readers of Overload and other publications when reviewing introductory texts for C++ — my repetitive complaint is that most C++ books introduce C++ in the context of C. This book does not. The co-authors of this book are highly accomplished writers with a long track record of writing technical articles that are clear, accurate, and a pleasure to read. In addition, both have an extensive understanding of C++ and how the language has been designed. They also have a wealth of experience of presenting training in C++ to bright students who have never been corrupted by learning C. Their technical knowledge coupled with their writing skills absolve this reviewer from any need to write about that aspect of the book.

You can take it as a given that this book, like all others from the keyboards of these authors, is technically correct and highly readable. What you may not instantly realize is how radical their approach to learning C++ would be. The declared target readership is those who are either very quick studies, or who have prior experience of some form of programming. The authors have undertaken a fundamental review of the needs of the newcomer to C++. Who else would have even considered teaching template functions before addressing user-defined types? (See Stan Lippman and Josee Lajoie in The C++ Primer, 3rd Edition.) Chapter 8 is about template functions. (And here we have one of the very few places that I disagree with the authors; they use class instead of typename to declare type parameters.)

User-defined types are not introduced until Chapter 9, and enums are left until the very end of the book. While the full range of the Standard C++ library is introduced early and on a basis of need (and that includes early introduction of STL containers, algorithms, etc.,) writing your own template types is just covered lightly later on. I believe this is entirely correct. All C++ programmers should be using the tools provided by the language; but designing types, particularly generic types, is not a necessity and is certainly not needed early on. The theme might be summarized as learn to use the tools provided before trying to design your own tools.

Each chapter finishes with a well thought out set of exercises. They may not all be fresh to the experienced programmer but they are much better than average, and almost all exercises are designed with purpose. I compare this with the numerous cases where I find exercises that seem to have been added in as an afterthought. You may not agree with the detailed design of the course that this book represents, but it is so far ahead of anything else I have seen that you have only one of two rational choices: use this one or write your own. If you are responsible for mentoring others, for designing courses, for advising on learning C++, or developing C++ skills, you must not only read this book, but study it until you understand the philosophy that lies behind it. I doubt that you have ever read such a dictatorial statement from this reviewer. However, believe me, this book outdates every other introduction to C++.

What we need next is a lower paced book for the real novice with no programming experience, and one or more books on the more advanced aspects of C++. I hope that budding authors will take this book and try to emulate it in other areas. This book is a strong contender for my "C/C++ Book of 2000" award (in fact it shared that honor with Generative Programming by Czarnecki and Eisenecker) because it meets the criteria, which include setting new standards and new insights that others should aspire to. I have never previously been tempted to nominate a book for novices for this award. (I should own up to the fact that I know the authors and so I am clearly biased, but they have not promised even a meal in exchange for this review. If you do not like the chapter numbering, blame me, because I suggested it. Now you will at least have to look at a copy to find out what on Earth I am talking about.)

Note that there are inevitably some typos in the first printing. If you want to check the errata, an electronic copy of all the source code, or look for other information about the book, have a look at www.acceleratedcpp.com.

Francis Glassborow comes from the generation where you learned to program by the seat of your pants. For over 25 years, he taught mathematics and computer studies to teenagers. He retired a dozen years ago. These days he turns his hand to many things from competitive Bridge, instructing novices in Sailing, and representing the UK at ISO meetings for the standardization of C and C++. He is also an active member of ACCU, and one of its main driving forces.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.