Home :: Books :: Computers & Internet  

Arts & Photography
Audio CDs
Audiocassettes
Biographies & Memoirs
Business & Investing
Children's Books
Christianity
Comics & Graphic Novels
Computers & Internet

Cooking, Food & Wine
Entertainment
Gay & Lesbian
Health, Mind & Body
History
Home & Garden
Horror
Literature & Fiction
Mystery & Thrillers
Nonfiction
Outdoors & Nature
Parenting & Families
Professional & Technical
Reference
Religion & Spirituality
Romance
Science
Science Fiction & Fantasy
Sports
Teens
Travel
Women's Fiction
C++ Template Metaprogramming : Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)

C++ Template Metaprogramming : Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)

List Price: $44.99
Your Price: $38.81
Product Info Reviews

<< 1 >>

Rating: 4 stars
Summary: A different take on templates
Review: It was only some 5 or 6 years ago that templates became standardised in C++. Even now, frustratingly, different C++ compilers may still have slightly different treatments. That notwithstanding, templates have been widely recognised as enhancing the expressive power of C++. But the authors reveal that perhaps you have not fully appreciated just how expressive templates can be.

They aim this book at experienced C++ programmers. Who still probably have not used templates beyond the standard examples. The metaprogramming in the book goes on at compile time, not run time. Previously, explicit user directives at compile time might have been parser type commands, along the lines of YACC. But templates open up this compile time to a wide new space of manipulations. While the authors were not the first to discover it, the book appears to be one of the first to promulgate the idea.

The book is replete with examples of programming these templates. Some of you will thrill to explore it. But others may find it very confining. Because data is immutable. So compile time C++ has no analog of the non-constant variables used in run time C++. This immediately rules out for loops, for starters. Instead, recursion is often used in place of for. It's a different mind set to cultivate. Metaprogramming is intriguing, but its utility may be only in a few circumstances.

Rating: 5 stars
Summary: Necessary book for template library writers.
Review: This book describes the boost MPL library. Its a very useful guide to this library and it includes enough examples to walk you through how to use it.

Secondly the book explains Meta-programming. This is a new concept to a lot of C++ programmers and old hat to LISP programmers. The C++ pre-compiler is constrained to integral types as constraints. But there are a host of tricks you can use within that constraint to build libraries that adapt to their calling structure. Thus generating code that is as efficient as hand written. Of course with your compiler, your milage may vary.

The other great thing about using this library, MPL, is that where you would write repeticious template code for every parameter in a template'd library like Tuples, you can automate with it with MPL.

Meta programming is a pretty new concept within the C++ community and this book will give us a common language to talk about it. There are other resources on the net, but this book pulls them together.

Highly recommended for expert C++ programmers, C++ Library writers and intermediate programmers study'ing to become experts. If you finished Andrei's book, "Modern C++ Design", this is a great next book to buy and own.

Rating: 4 stars
Summary: An interesting book...
Review: This is a really interesting book. The template metaprogramming technical topics covered are extremely advanced, and right at the leading edge of C++ library development, yet the step-by-step presentation makes the material understandable even to intermediate programmers. Since the book draws its examples from code that works with the Boost libraries (supplied on a CD), readers can try the examples and play around with them to see how they work.

Some of the libraries discussed (Boost Type Traits, Boost Bind) are well along to becoming part of the C++ standard via a library technical report, so they will eventually become available to every C++ programmer. The bulk of the book is devoted to the Boost Metaprogramming Library, which packages up a lot of advanced techniques into accessible form.

One issue with template metaprogramming is that compile times can get out of hand. The book includes an appendix with hints on avoiding the problem, together with test timings for a half-dozen popular compilers. I really like the timings; too many other authors make assertions about efficiency without supporting data.

I would guess that this book will be of interest to intermediate and advanced C++ programmers interested in library development. And less interesting to beginning programmers, or programmers who never package up their creations into libraries.



<< 1 >>

© 2004, ReviewFocus or its affiliates