Imperfect C++: Practical Solutions for Real-Life Programming
Imperfect C++: Practical Solutions for Real-Life Programming by Matthew Wilson
- Binding:
- Paperback
- Number of Pages:
- 624
- ISBN:
- 0321228774
- Product Group:
- book
- Publisher:
- Addison Wesley
- Publication Date:
- Nov. 4, 2004
- BooksForGeeks.com ID:
- 1124
Reviews for Imperfect C++: Practical Solutions for Real-Life Programming
-
Genuinely new C++ material
Rated out of 5 stars, February 12th, 2007
This is very different from the many 'intermediate C++' books that are on the market. If you've had your fill of reading about pimpls, use of const and which overloaded operators should be members, it's time to read 'Imperfect C++'.
Be warned, it does take a little while to get going, and the author has a rather unusual writing style, which can best be described as an informal hybrid of Aussie and British. And admittedly the opening part of the book covers material reminiscent of the likes of 'Effective C++', albeit with a stronger emphasis on optimisation.
But once it gets going, there's a whole new world opened up, rather remote from the rarefied atmosphere of more theoretical books. Imperfect C++ has a very 'in the trenches' feel, where you need to write programs that talk to C, and on a Windows platform. None of the book is about object oriented design as such, but has a library designer's appreciation for dealing with operating system quirks.
You know how lots of books have advice along the lines of "NEVER do this" or "ALWAYS do this"? Matthew Wilson takes great delight in providing examples where you might want to do the opposite, and covers a wide variety of topics, including defining a portable boolean, a NULL value, and C#/Pascal/Python-like properties.
Purists will almost certainly dislike the fairly heavy use of macros for some of the solutions here, you'll have to get used to the appearance of code with a plethora of underscores in. And the book assumes a reasonably high level of knowledge of C++. In particular, there's little hand holding. Entire class definitions are often provided, but you won't always get example application code to see it in action. This is a little unfortunate, particularly in the chapters where the author introduces his own idioms. It requires careful concentration to work out the physical layout of some of the solutions (e.g. are these free functions or member functions? In the same namespace or a different namespace?). On the other hand, some readers will no doubt welcome the vigorous thought that is required.
Overall, this is a very different, practical book to most of the C++ books out there, with a very high signal-to-noise ratio. Add it to your C++ recommended reading list. -
A very good book.
Rated out of 5 stars, December 12nd, 2005
The book is presented in good style and covers a wide range of aspects of C++ programming. It even has an attractive cover.It is not just limited to discussing the C++ language itself, it also covers subjects such as binary compatibility issues along with workable compromises.
Wilson describes many generic techniques that he uses in his own programs, many of which are gems or are at least inspiring.
I think a very important aspect of Wilsons' style is the way that he consistently guides you through the many examples throughout the book. He doesn't just show you the finished code and describe why it was written that way. Instead, he takes you through other less satisfactory solutions first so that you actually LEARN something along the way.
I'd thoroughly recommend this book to the intermediate/advanced programmer.
-
Thought provoking
Rated out of 5 stars, September 12th, 2005
Just two reservations: I'm not sure that I would use all of the techniques in my own code. The coverage is Windows-centric (not that things are really different on other platforms, just that it would have been nice to see some more information in the various tables comparing functions and performance of compilers). It's good to read about some of the C++ compiler implementation grey areas. I think that the bottom line with this book is "go and try it for yourself". -
Most useful C++ book in last 5 years
Rated out of 5 stars, June 12th, 2005
With a very few exceptions - e.g. veneers (Chapter 21) - the contents of this book are just stunningly practical and useful.Ever wanted to use C++ objects between binary components written in different compilers? (Chapter 8)
Ever needed *real* multidimensional arrays? (Chapter 33)
Did you think that C++ doesn't support efficient Properties, a la Delphi & C#? (Chapter 35)
Ever wanted to know about how to write non-trivial custom cast operators? (Chapter 19)
Want to know how static objects and multi-threading can co-exist? (Chapters 10 & 11)
Interest in applying Design by Contract principles to C++? (Chapter 1)
Need strong typedefs? (Chapter 18)
And the list goes on and on. And, being a fellow Brit, I can't help but warm to the author's sense of humour.
Buy one, and get one for your mum!
D.T.
-
A Great C++ Journey
Rated out of 5 stars, November 12th, 2004
This book is a fantastic source of C++ information, ranging from contract programming, through multi-threading issues, to shims, veneers, and bolt-ins. Haven't heard of the last three? Well, beyond the treatment of topics that are already in your vocabulary, Matthew thoroughly discusses inventions of his own (and/or refinements of existing techniques). I especially enjoyed parts two and three of the book, where the foundation from part one is put to real-world use. As this is, to a large extent, a practical guide to taming the beast that is C++, it fills a hole left open by many other (more theoretical) books. The author has quite a unique writing style, which reflects his colorful personality - resulting in a rewarding and fun read.In a sea of C++ pop, Imperfect C++ stirs up the water with some soul.

