Need C++ book recommendation for experienced programmer

Started by
19 comments, last by phresnel 14 years, 7 months ago
Quote:Original post by Scourage
Effective C++ by Scott Meyers
More Effective C++ by Scott Meyers
Effective STL by Scott Meyers


These. I truly believe "experienced c++ programmers" as a whole have learned to use the language too well to notice some of the obvious flaws in their programming. I know I was culpable. Also:

Refactoring, by Martin Fowler et al.

That one's good too.
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]
Advertisement
Nobody mentioning "Modern C++ Design" by Andrei Alexandrescu? I found that one quite interesting and a nice change from all the "typical" C++ books. Away from the pitfalls of multiple virtual inheritance and right into template magic. Maybe not so recommended if you need to support oldish compilers.

-pretty much all about templates
-common patterns done with templates (factories, multiple dispatch)
-policy based design (plug together bits of "behaviour" for flexible classes)
-type lists and some ways to use them

One danger might be feeling the need to start using templates for everything that you just might need again.

Stuff done after reading:
-using type selectors and compile time inheritance checking for a shared pointer that automatically uses internal ref counting if the pointee is derived from refCountable and external ref counter otherwise (requiring the user to know about that detail and manually making the decision felt slightly wrong)

-using type lists and selectors for platform independent "automatic" typedefs, that always select a signed/unsigned/float type of the requested size, like:

typedef TypeBySize<2, UnsignedType> uint16;

-other minor stuff
f@dzhttp://festini.device-zero.de
Quote:Original post by Trienco
Nobody mentioning "Modern C++ Design" by Andrei Alexandrescu?

I think the book is a little bit too advanced for the OP.

Quote:Original post by Trienco
-using type selectors and compile time inheritance checking for a shared pointer that automatically uses internal ref counting if the pointee is derived from refCountable and external ref counter otherwise

Is intrusive reference counting really that useful? If you are worried about performance, make_shared only does one dynamic allocation for the object and the refcount at once.
If you want to master C++ template magic, then get a copy of Vandevoorde/Josuttis: "C++ Templates: The complete guide".
Quote:Original post by phresnel
If you want to master C++ template magic, then get a copy of Vandevoorde/Josuttis: "C++ Templates: The complete guide".


Seconded. It was after reading this book that "Modern C++ Design" suddenly started to make sense (at which point I deeply regretted having sold "Modern C++ Design" already).
Quote:Original post by Konfusius
Quote:Original post by phresnel
If you want to master C++ template magic, then get a copy of Vandevoorde/Josuttis: "C++ Templates: The complete guide".


Seconded. It was after reading this book that "Modern C++ Design" suddenly started to make sense (at which point I deeply regretted having sold "Modern C++ Design" already).


Yes, it's not only great for templates, but also has (imho) unbeatable explanations (apart from the holy standard itself) about lookup rules and overload resolutions.
Quote:Original post by DevFred
Is intrusive reference counting really that useful?


Probably depends on how forced it is, but I have certain constructs that are simply meant to be used like that. Not much extra work and it just feels like a cleaner solution (I also can't dare to introduce Boost without risking some people getting a heart attack... using std::map was already a shock to some).

I did however just order the other suggested book about templates. Reviews look promising and you can never know enough details (helps to understand just what those weird compiler errors are trying to tell you).
f@dzhttp://festini.device-zero.de
Lots of input. Thanks for all of the replies. I'm going to start with C++ Primer and the Stroustrup book and then move on to the Effective C++ series. I'll see where I need to go after that.


Imperfect C++ sounds like it's exactly what you're looking for. This is a really really good book but it's not as widely recognized as some of the other ones, perhaps because it came out a bit late after the "bibles" had already been established.
My top picks would be

the Meyers book (doesn't so much teach C++ as keep you out of the bad C++).

C++ FAQ
http://www.parashift.com/c++-faq-lite/

I like to read the FAQ at least once every 6 months - always find something I didn't know or didn't realise.

This topic is closed to new replies.

Advertisement