|
|||||||||||||||||||||||||||||||||||
|
12 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
27 of 29 people found the following review helpful:
4.0 out of 5 stars
An interesting book...,
By
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
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.
33 of 37 people found the following review helpful:
3.0 out of 5 stars
I found the title misleading,
By
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
This book is called "C++ Template Metaprogramming" but it should be called "Boost MPL API Reference." The first portion of this book covers the basics of template metaprogramming fairly well, but what I wanted the rest of the book to cover were both advanced techniques and real-world applications. What I got was material on how to use the Boost metaprogramming library. This book mostly covers just that library, and the various templates that it offers, but what I felt the book should have provided was not only how the more interesting parts of the MPL were implemented, but also interesting applications of the MPL where some interesting algorithm was made possible by template metaprogramming. I can look up the MPL reference docs online, thank you very much.
To summarize - this is a pretty good introduction to template metaprogramming, but seems to be suited for the unlikely position of someone who wants or needs to use this technique, but isn't academically interested in it, and so mainly needs a walkthrough of the set of standard functions available as part of the MPL. This book is a bad choice for those interested in template metapgramming and wondering if it might help them, but want to learn more about it and its applications first.
17 of 19 people found the following review helpful:
5.0 out of 5 stars
Necessary book for template library writers.,
By
Amazon Verified Purchase(What's this?)
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
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.
5 of 5 people found the following review helpful:
4.0 out of 5 stars
In depth, but not intuitive,
By Mr Squiggle (Adelaide, SA, Australia) - See all my reviews
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
I knew in purchasing this book that most of the time it would just be talking about the Boost MPL. That shouldn't be too bad - the Boost MPL is pretty much the fore-running meta-programming library, and there has to be lots of concepts in there to be learnt too, other than library specifics, right?
Right. This book completely lives up to this explanation. Very quickly we are into the guts of the library, even within the beginner's tutorial section. There certainly is a LOT of concepts to be learnt and used, even if externally to the MPL. However, I found that very quickly I was having to reread and triple-read passages to try and distil a principle from the library construct being explained. They principles are there, and are good, but I find that they are not presented distinctly enough from the library itself. This results in what feels like a lot of work to really understand the book (other than just know how to use the library). I don't consider myself slow - I got through almost all of "Modern C++ Design" (by Alexandrescu) without having to go to a computer, but here I really felt like I NEEDED to try this stuff out on a computer and attempt the problems at the end of the chapter. This book is a lot of work - beware! - and particularly it is more than I feel should be necessary, if perhaps the authors allowed themselves more time to explain principles and concepts away from the interface of their library. However, there is a lot of knowledge here that I don't think that you can find elsewhere, and it is a topic that is, by nature, a bit mind-bending, so I am still definitely happy with the purchase.
4 of 4 people found the following review helpful:
3.0 out of 5 stars
Good for gurus, too much for anyone else,
By mtlimber (Florida, USA) - See all my reviews
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
This is basically thorough documentation for the Boost MPL. Not for the faint of heart (when it comes to C++ templates), and probably not of too much use except to C++ gurus-in-training and to library writers.
11 of 14 people found the following review helpful:
1.0 out of 5 stars
No Target Audience Specified,
By Dash Riprock (Portland, OR USA) - See all my reviews
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
I would really like to learn about the boost mpl and I thought this book might help. Well, I'm learning, but only because I'm working very hard to untangle the mess presented. Here are some of the fundamental flaws in this book.
1. There is no target audience. This book might have been about how to design an mpl like library, but it makes no attempt to address this issue. This book might have been about how to use the mpl, but it doesn't do that either. It seems to be about justification for why certain choices are made, but it gives false examples when doing so. For example 3.3's example of the add_pointer template is simply not what is in the library. You can see this yourself by visiting the boost site and compare what's in the text of this chapter to what's in the boost library's code. In the end I can't even tell what this book is trying to accomplish. The author should have stated the target audience somewhere, but doesn't. It is written as if the designer wrote note justifying design decisions to a co-worker already knowledgeable about both how to use mpl and it's design. Maybe this book was translated from notes between the two while they designed it? 2. Example code on CD wrong. They include sample code on the CD from the book's text. The code says it was automatically extracted. Unfortunately it doesn't match even remotely. I think something was wrong with the tool they used. Even if it was right, it's a repetitive dump without any reference to page or section so you have to open many files and dig to find what you want. There is absolutely no way to look at the code in a particular section and find it on the CD in any reasonable way. 3. No examples are complete. The authors like taking an attempt to solve a problem, then show a weakness to the suggested solution, tweak some code, show another weakness, ... This might be an okay approach, but I strongly suggest a final product at the end of the tweaks be somewhere. If that's somehow prohibitive in printing costs, at least put the final code on the CD. I could go on all day about just how bad this book is, but I really need to spend my time learning the concepts if I'm ever going to use it. If I get a chance I'll get back here and write more about the mistakes. To those thinking of purchasing, go to the boost site, read the free chapters, then assume you've read the "best of" materials. If these free chapters make sense and you learn a lot reading it, you are smarter than me. If not, then don't assume you will do better if you had the full text, because it won't help you.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
An excellent treatment of the topic,
By
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
This was a pivotal book for me. I'd been working with C++, both as a programmer and a compiler writer, for almost 20 years. Yet despite an intimate familiarity with templates, the notions of template metaprogramming had always eluded me. By chapter 3 of this book, however, it felt as though a heavy curtain had been lifted. I actually became excited to wake up each day at the thought of reading the next chapter! Imagine that, from a C++ book.
The material is well-paced, lucidly written, and doesn't stray into minutae any longer than necessary. I would recommend it to anyone who wants to find out more about applying metaprogramming techniques to their own code. I'm already thinking of news ways I can use it. The only caveat I would mention is that your background will in large part determine this book's value to you. Coming from a C++ background, and lately having an intense interest in Haskell, I found many of this book's points "popped out" at me, showing connections between runtime C++ and compile-time functional programming (in the strange meta-language that is compile-time C++). But had I not had that prior experience, and been struggling with the very issues this book solves, some of it may not have had as great an impact. Be ready to do more research if you find the material a bit rough going. There are some profound implications between its pages that may not be obvious at first, but they're there.
3 of 3 people found the following review helpful:
4.0 out of 5 stars
Unique material,
By wiredweird "wiredweird" (Earth, or somewhere nearby) - See all my reviews (HALL OF FAME REVIEWER) (TOP 500 REVIEWER)
Amazon Verified Purchase(What's this?)
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
Abrahams and Gurtovoy address a distinctive and little-known set of C++ features: behaviors of the template mechanism that go far beyond swapping "double" for "float." In fact, Lisp-like recursion, arithmetic, and list-processing features, all executed at compile time, give the C++ typing subsystem all the power of a Turing machine - but without such nice debugging features.
The authors base most of their discussion on the open-source Boost Meta-programming library (MPL), perhaps the most widely known and highly developed usage of this capability. Most of the discussion patiently describes this exotic set of capabilities, giving the reader a clear idea of what the library does and some idea of how the library does it. I came away a bit uncertain about the authors' purpose, though. I didn't see enough detail in describing the primitive C++ mechanisms for a reader to go off and use those primitives in new ways - this largely discusses the MPL library elements as black boxes, without a lot of detail about how they work. But, if the intended reader was meant to incorporate an existing library (like MPL) into an application, I didn't see enough in the way of practical examples or motivation. It's nice that API elements exist for handling lists like - but why? In what context do such lists arise? What useful work does this tool perform? Or is it just an idea book for an obfuscated C contestant? Unless you've mastered the user-unfriendly documentation for Boost MPL or other libraries mentioned here, this really is the only book on the topic. I wish it covered everyday basics a bit better, for example checking that some class in a template parameter is derived from some other class. I look forward to the next reference on the topic, one that goes over internals of the library more thoroughly, or one that gives more examples of practical applications. -- wiredweird Four stars - but that might have been different if there were another book on the topic to compare it to.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
Very good book,
By Cumhur Guzel (Sydney, NSW, Australia) - See all my reviews
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
I am not a meta programming expert, however I learned a lot from this great book. I suggest first to read Alexandrescu's Modern C++ first and a learn basic techniques then get this book to be able understand the mpl better.
10 of 14 people found the following review helpful:
5.0 out of 5 stars
Hope to see more books written by David Abrahams,
By
This review is from: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
C++ Template Metaprogramming is a very valuable book. For me, already chapter 2 was worth the money of the complete book. It showed me how to think in Templates and Metafunctions. That helped me to understand a lot of the other template technics.
As a user of boost.python I always wondered what's possible with templates. My personal target is to understand what's going on in that magic library. This book brought me a very big step further. I suggest reading this book before reading any of the other Template books like 'Modern C++ Design'. But probably you don't need no other book after reading this one. |
|
Most Helpful First | Newest First
|
|
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond by David Abrahams (Paperback - December 20, 2004)
$54.99 $40.25
In Stock | ||