

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Mexico.
In Modern C++ Design , Andrei Alexandrescu opens new vistas for C++ programmers. Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code. This book introduces the concept of generic components―reusable design templates that produce boilerplate code for compiler consumption―all within C++. Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding. The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications. Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include: Policy-based design for flexibility Partial template specialization Typelists―powerful type manipulation structures Patterns such as Visitor, Singleton, Command, and Factories Multi-method engines For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution. Review: Exceptional material - The material presented in this book is mainly for library writers and senior developers who are in charge of software design. Having said that, the material here is unlike you'll find in any other book. Author discusses design and implementation of reusable components like a (very sophisticated) singleton, visitor, generalized functors, smart pointers, etc. I found discussions on smart pointers and singleton to be particularly enlightening. Its amazing how a simple design pattern like singleton could have so many intricacies. But the chapter which blew me away was that of typelists, and what author achieves by using simple metaprogramming constructs (although I would be the first one to admit that a mere mortal software developer like myself would not be using typelists everyday, but its still fun to learn about them). This book is very different from whatever material I had read earlier on C++. Do read this book once you are familiar with topics like templates, common design patterns and smart pointers. Review: The most important C++ book in many years - Many years ago, I began to feel that the power of templates in C++ has not been fully exploited. In more recent years, the emergence of the STL has shown that templates can be used to great advantage for containers, allowing conceptually simple generic implementations to be reused in a wide variety of situations, with no run-time penalty. This advance only increased my sense that we haven't yet seen the full power of templates. Alexandrescue's remarkable work is, in my view, the most original and important advance in C++ since the STL. It has been an article of faith in the design patterns community that one can't implement a reusable design patterns library in any language, because each pattern has dozens of important variations, and an unlimited number of custom variations, all seemingly interdependent. Alexandrescue's work seriously challenges this assumption. He uses "policy classes" (explained in Chapter 1) together with many innovative template techniques to pull apart these interdependencies. The heart of the book describes in detail how he developed the "Loki" library containing many gang-of-four design pattern implementations. Loki's SmartPtr, one of the high points of the book, puts to shame the Standard C++ auto_ptr, which has been the state of the art until now. Even before Alexandrescue's work, templates provided C++ programmers with major advantages not available in "more modern" object-oriented languages such as Java and C#. Alexandrescue multiplies the existing advantages many times, facilitating dramatic increases in C++ programming productivity and quality. Isn't that what high-level language programming is all about? The only negative comment I have is not really a criticism of Alexandrescue's work, but of the deplorable state of C++ compiler implementations. Because many C++ compilers, especially the most popular ones, still do not fully support Standard C++, many of Alexandrescue's techniques cannot yet be used in many practical situations. I would like to think that the importance of supporting Alexandrescue's library will motivate compiler vendors to make the necessary, and long-overdue upgrades.
| Best Sellers Rank | #1,178,855 in Books ( See Top 100 in Books ) #239 in C++ Programming Language #1,005 in Computer Programming Languages #3,306 in Computer Software (Books) |
| Customer Reviews | 4.6 out of 5 stars 202 Reviews |
A**R
Exceptional material
The material presented in this book is mainly for library writers and senior developers who are in charge of software design. Having said that, the material here is unlike you'll find in any other book. Author discusses design and implementation of reusable components like a (very sophisticated) singleton, visitor, generalized functors, smart pointers, etc. I found discussions on smart pointers and singleton to be particularly enlightening. Its amazing how a simple design pattern like singleton could have so many intricacies. But the chapter which blew me away was that of typelists, and what author achieves by using simple metaprogramming constructs (although I would be the first one to admit that a mere mortal software developer like myself would not be using typelists everyday, but its still fun to learn about them). This book is very different from whatever material I had read earlier on C++. Do read this book once you are familiar with topics like templates, common design patterns and smart pointers.
B**N
The most important C++ book in many years
Many years ago, I began to feel that the power of templates in C++ has not been fully exploited. In more recent years, the emergence of the STL has shown that templates can be used to great advantage for containers, allowing conceptually simple generic implementations to be reused in a wide variety of situations, with no run-time penalty. This advance only increased my sense that we haven't yet seen the full power of templates. Alexandrescue's remarkable work is, in my view, the most original and important advance in C++ since the STL. It has been an article of faith in the design patterns community that one can't implement a reusable design patterns library in any language, because each pattern has dozens of important variations, and an unlimited number of custom variations, all seemingly interdependent. Alexandrescue's work seriously challenges this assumption. He uses "policy classes" (explained in Chapter 1) together with many innovative template techniques to pull apart these interdependencies. The heart of the book describes in detail how he developed the "Loki" library containing many gang-of-four design pattern implementations. Loki's SmartPtr, one of the high points of the book, puts to shame the Standard C++ auto_ptr, which has been the state of the art until now. Even before Alexandrescue's work, templates provided C++ programmers with major advantages not available in "more modern" object-oriented languages such as Java and C#. Alexandrescue multiplies the existing advantages many times, facilitating dramatic increases in C++ programming productivity and quality. Isn't that what high-level language programming is all about? The only negative comment I have is not really a criticism of Alexandrescue's work, but of the deplorable state of C++ compiler implementations. Because many C++ compilers, especially the most popular ones, still do not fully support Standard C++, many of Alexandrescue's techniques cannot yet be used in many practical situations. I would like to think that the importance of supporting Alexandrescue's library will motivate compiler vendors to make the necessary, and long-overdue upgrades.
F**N
masterpiece
First of all, i don't understand why so many ppl complaining that the book talks too much about template. The title says generic programming; even you are so genius that you find other way to accomplish generic programming, I'm sure all the concept still apply. I'm really happy i read a review from Gamma's pattern (very good, but very dry, takes years to digest) book and pointed me to this book. It teaches you how to implement pattern using generic way. As an engineer(not computer science), I found the book answered a lot of question and probelm that I wasn't be able to deal with practically. Here are the list that you can learn from this book, 1. ever wonder how to write library like boost.org, read this book 2. ever wonder how can you create a object with the same type of another object(or some type) without knowing the type, read this book 3. don't want to implement pattern yourself or don't want to hard code the pattern, ex. object factory, then just download the code. VC,BC&GCC are supported Masterpiece.
M**R
The best c++ design book out there
Never has a professional/technical book made such an impact on me. I've had this book for many years,but decided to write this review only now because after so many years the pearls of this beautiful masterpiece are unfolding to me. If I love C++ it is because of Andrei Alexandrescu and his amazing book. I only wish that he would write some more books like this. If you find this book to be scary at first and hard to understand, I would like to encourage you to keep on reading and trying. You'll get it eventually and once you do, there is no way back :)
D**R
It's amazing what you can do with Meta Programming
I remember reading this book for the first time about 7 yeas ago and feeling my head turn inside out. Upon re-reading it recently I found it exciting and very understandable. The techniques outlined in this book solve problems that no other techniques can resolve. I find it amazing what can be done with classes and functions that never even get constructed. Definitely gives a good coverage for all aspects of Meta Programming I think one of the measures of respect by which this book is regarded is how many of these pioneering techniques have made It into the Boost library. Thoroughly recommended for the intermediate to advanced programmer to have in his library. Even if you don't use C++.
B**E
Great techniques, not for the normal programmer
Finally I picked up "modern C++ design". It was on my list for a long time. Last years I've been diving more in Java, Groovy, Ruby and other languages. So, this book was back to C++ for me. I found the book well written, even almost funny at times. The code was clear and it was all easy to understand for me. So, well done since it's always difficult to explain fairly advanced concepts in simple language. The book consists of 2 parts. The first part describes concepts like policy-based design and typelists. I liked the concept parts and this was my first encounter with typelists, thus I was quite amazed. The second part of the book describes how to design generic patterns. I liked them, however, I felt that making some of these patterns generic is not really worth it. The amount of duplicate code removed, is not very high. The complexity added by the generic implementation, however is high. An example is chapter 7, smart pointers. I've designed some libraries in the past and as library designer we agreed on 3 different types of smart pointers. We write three different classes and that's it. Is it worth making a generic implementation which can cover all of these three types. In my opinion, no. However, as an exercise of what you can all do with templates in C++, it was very interesting! I'm now and then working with developers who develop in C++. They already struggle with the complexity of the language, the environment and the tools. Giving them generic programming in C++, would probably increase their struggle and wouldn't really gain much. Maybe a new language need to be created with better generic programming support instead? Anyways, for any C++ fanatic or programming fanatic, this is a fantastic book. For "the normal developer" it's probably overkill.
G**.
Read this if you want to master C++
This can be a tough read for those most used to C++ as a better C. But if you really want to take advantage of the power of C++ to make complex jobs much more manageable, this is the book. The techniques discussed by Alexandrescu are powerful and well explained; I found many tools here to aid in architecting and implementing the systems I am currently working on. Note that a small number of the techniques discussed in the book have been rendered unnecessary by the latest C++11 standard. However the vast majority of the book is spot on and current, and considering the state of compliance of the many compilers out there to the C++11 standard you will likely find everything useful.
S**O
One of the Most Important C++ Books!
It smartly explores C++ metaprogramming techniques, weaving page after page an extraordinary framework to support popular language idioms and design patterns. It is still effective, even if conceived with C++98 standard. It would be great if a new edition had been released to embrace all the potential of C++11/14. If you want to learn more on meta programming subject, I suggest you " C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond ", by D. Abrahams, A. Gurtovoy.
K**R
Must read, reread and read again.
One of the best c++ book. Though its not suitable for begineers but if someone really want to know template, its for them. It require you have some idea on template, but you'll find yourself thinking in templates. Genious template tricks. If read carefully you'll learn design, best c++ practice, and patterns. Just get template idea before reading this book. Andrie is genious.
M**C
Un joyau d'astuces
Si vous cherchez à savoir ce qu'est la métaprogrammation en C++ ce livre est définitivement fait pour vous. Vous n'aurez besoin pour le lire que de savoir les règles de base concernant les templates en C++ (et être à l'aise avec), et Alexandrescu vous guide vers la compréhension de ses constructions toutes plus étonnantes et remarquables les unes que les autres. C'est une véritable façon de programmer "at compile-time" qu'il offre au programmeur. Ces méthodes ne sont cependant pas très utilisées en environnement de production (utilisation lourde des macros, temps de compilation rallongés, maintenabilité discutable) et on admirera donc plus la beauté des objets que leur éventuelle réelle utilité. C'est en tout cas un moyen étonnant de voir comment les règles d'apparence inoffensives des templates C++ offrent finalement un pouvoir d'expressivité très riche.
A**L
Didn’t expect much but Surprised by the Quality
I wanted some books to review my C++ skills and suddenly found out this deal. The price was in such a sweet spot that I couldn’t ignore it. To be honest, I was not expecting much. Anything readable would be acceptable for me. But I was amazed when I got it in my hands. The book was in a great condition for its price. I would love to buy again from them.
O**E
A must-read book!
You really have to read this book! It's much more than "modern C++ design". . . . . . .
E**O
beste Tips/Tricks Sammlung bisher
in diesem Sachbuch werden viele spezielle Techniken vermittelt (so zB. generische Policies über Templates), die selbst einem erfahrenem C++ Entwickler noch einiges abverlangen werden. Meiner Meinung nach eine verpflichtende Lektüre für jeden C++ Entwickler, wer denkt C++ als Programmiersprache verstanden zu haben wird in diesem Buch von Herrn Alexandrescu eines besseren belehrt werden und das auf einen sehr angenehme Art (jeder der schon einmal einen Vortrag von Herrn Alexandrescu beiwohnen durfte und seine hurmorvolle Art kennt, wird hier positiv Überrascht sein).
Trustpilot
3 weeks ago
2 months ago