Découvrez les ressources cachées de la bibliothèque standard, l'emploi judicieux de l'héritage, les subtilités des espaces de nommage, les surprises que peuvent réserver les itérateurs et les fonctions virtuelles, les techniques permettant de minimiser les dépendances au sein d'un programme ou d'utiliser au mieux les modèles génériques. Notons que cet ouvrage met l'accent sur la gestion des exceptions.
Problèmes et solutions pratiques
C'est dans le contexte de leur utilisation professionnelle que la majorité des techniques et pièges du C++ sont ici abordés, sous la forme de cas pratiques très pertinents.
À qui s'adresse cet ouvrage ?
- Aux développeurs en C++ expérimentés - Aux étudiants en informatique apprenant le C++ (IUT, 2ème cycle, écoles d'ingénieurs) et souhaitant approfondir leurs connaissances.
It should be 5 stars because of the quality of the content, but unfortunately this book hasn't been updated for modern C++.
Exceptional C++ honours its name and has great pieces of advice. Some parts, like advanced memory management, are quite tricky, and will require me a second read. Others, like the use of the Pimpl idiom, what to add into an interface, name resolution, and how to write exception-safe code are useful from the first time.
This series is really good and brings to light a lot of C++ related issues people need to be aware of.
It also makes you realize, though, how much C++ is your enemy. How you have to fight the language to get stuff done. You may be at a point in your journey where you have become numb to this fact. But then reading this series you think about:
1. The Pimpl idiom, a huge mess of a method to get boxed objects (invisible and automatic in every language of the last 20 years)
2. Slicing, something you have to constantly watch out for in C++ (a complete nonissue in other languages)
3. how basically every component of the C++ standard library except the STL is poorly designed
4. Ridiculous template error messages
5. components of the C++ standard that are almost universally unimplemented and considered stupid (export...)
6. how incredibly primitive is textual inclusion of header files? It's like this is 1965 or something.
7. And C-style macros! Wow.
8. Manual memory management. Oh, wait, now there's shared_ptr! The C++ community has reinvented reference counting garbage collection, only 50 years behind schedule. Oh, and you have to manually write crap for the things you want collected and deal with their interaction with manually collected stuff.
9. The absurd hoops you have to jump through to simulate things like nested functions.
10. Incompatible compilers and library implementations.
And on and on.
Now like I said if you write C++ you are dealing with at least some of these issues all the time, but maybe you have become numb. These books will remind you.
The first third-to-half is 5-star material, then it starts to fade. The chapter on exceptions highlights the biggest challenges with exceptions (really any form of transaction logic in procedural programming) in a way I haven't seen comprehensively covered before, well worth reading.
Except for the item covering auto_ptr, this book is still relevant today, 18 years after being published. Not only the content is valuable, but it's also well written and even funny sometimes.
Not bad, has some good nuggets here and there... However, I felt the Q&A format of the book added absolutely nothing. It's likely just a relic of him copy/pasting the content from his online column.