Modern C++ Design: Applied Generic and Design Patterns (C++ in Depth) | 
enlarge | Authors: Andrei Alexandrescu, Scott Meyers, John Vlissides Publisher: Addison Wesley Category: Book
List Price: £32.99 Buy New: £10.99 You Save: £22.00 (67%)
New (41) Used (7) from £10.99
Rating: 6 reviews Sales Rank: 15214
Media: Paperback Pages: 352 Number Of Items: 1 Shipping Weight (lbs): 1.4 Dimensions (in): 9.1 x 7.4 x 0.8
ISBN: 0201704315 Dewey Decimal Number: 005.133 UPC: 978342704316 EAN: 9780201704310 ASIN: 0201704315
Publication Date: February 22, 2001 Availability: Usually dispatched within 1-2 business days
| |
| Similar Items:
|
| Customer Reviews: Read 1 more reviews...
A great way to discover and understand advanced programming techniques March 13, 2008 Fabrizio Angius (Pisa, Italy) An excellent book and a IMHO a MUST if you want to get a professional C++ (and not only) developer. It covers lots of practical topics, unveiling advanced techniques and "hidden" features of the C++ programming language. I would suggest to get a good knowledge of C++ first (e.g. read Stroustrup's TCPL bible) or you won't grasp most of the topics. I must admit that reading the book I was all "Wow! You can do that?!?". Sure, not a big deal if you are already a pro, but you won't be reading this review, I suppose. I would suggest this book even if you intend to move to another language as it really helped me thinking about things and understanding many language features and hardcore techniques.
template metaphysics March 2, 2007 Thing with a hook 9 out of 9 found this review helpful
This is 300 pages of the hardest of hardcore template metaprogramming you could currently hope to read. As a result, there is a risk you may find more to admire and speculate upon from afar, than to actually use. Various factors will decide this, from the robustness of your compiler, your comfort with far-out template wackiness, and your confidence in debugging and maintaining the result. One thing is not in doubt: C++ metaprogramming is devilishly clever. That's part of its appeal. It's also capable of producing flexible, efficient families of software. Modern C++ Design pushes the boundaries of TMP further than the more specialised matrix domain detailed in Czarnecki and Eisenecker's Generative Programming (a recommended prologue to this book). Here, the aim is implementing entire design patterns. This is a fairly bold claim, as the received wisdom on design patterns is that there isn't a canonical form that can be presented in code. And that still holds true. Instead, the code in Modern C++ Design is metacode built on two big ideas: policies and typelists, which are described in the opening chapters, along with some other useful tools. The hard intellectual work is done here, especially the typelist chapter, although previous exposure to the likes of Generative Programming definitely softens the blow. Policies are what Java programmers know as Dependency Injection, except one level of abstraction up (the relationship between classes and objects in DI is done with templates and classes with policies), and with the template instantiation and specialisation rules of C++ providing an extra layer of flexibility. Typelists are exactly as the name suggests - a list of types, but they exist only at compile time. They're fed to the TMP machinery, which spits out a class hierarchy based on the supplied list. With these tools in place, Andrei Alexandrescu then proceeds to show how they can be used to work some magic. Template versions of the command, visitor, abstract factory and factory method patterns are presented, along with other abstractions like smart pointers (perhaps the most orthodox chapter of the book), tuples, and multiple dispatch. The latter topic provides a connection to James Coplien's Advanced C++, which also discussed multimethods, albeit before templates entered the language. The books share a certain similarity, not so much in content, but in the spirit of stretching the boundaries of C++, and perhaps also in stretching its readability and maintainability. For all the virtuosity on display here (and in Coplien's book), I'm not sure if I'd to use these techniques in my own C++. This may just be down to my own mediocrity as a programmer, but TMP is more than just an idiomatic application of C++, it's really an entirely new language and not a very friendly one. When encoding error messages into class names is a best practice, you know you're pushing the envelope. There's no discussion in this book of where these designs are appropriate - I suspect the most rococo code will end up hidden safely behind frameworks and libraries such as the Loki library described in this book. Some discussion of these bigger picture strategic and cultural issues would have been handy, otherwise, a title like 'Modern C++ Design' suggests that herein lie techniques to sprinkle liberally throughout your code, and I suspect that this is not the case. If you, your co-workers, and any customers that need to look at your code are all template metagenii, this is going to be the most productive 300 pages you ever read. Lesser mortals will find much to wonder at and admire, and a whole new perspective on design patterns, but perhaps less to put into practice.
Well worth buying. February 18, 2005 C. D. Pickering (Suffolk, UK) 4 out of 7 found this review helpful
Despite the advanced concepts covered the book is very well written and quite readable, but it does require you to think! I was using concepts in this book in my applications almost immediately. 10/10
Excellent but may be too advanced for your compiler April 4, 2002 11 out of 12 found this review helpful
This is an excellent book, well written well structured and very interesting. The Library and the techniques described may not be of every day use but on those occasions when they are of use they would be very handy to have. The one problem is that these are advanced techniques and a lot of compilers (specifically Visual C++ 6/7) can't currently build the code. It is possible to rewrite the library to get around the compiler issues but it's a lot of extra work. That aside, compilers will be coming online that can use it soon so it is worth reading now in order to be able to start using it as soon as possible.
Don't forget to read this book July 18, 2001 5 out of 12 found this review helpful
This is a fantastic book. It's concise. It's precise. It contains many advances C++ idioms you would never have thought possible.
|
|
|