Google Plus Logo
Twitter Logo
Facebook Logo

Book Review : More Effective C++

Once I finished reading Effective C++, I decided to read the next one in the Effective C++ series: More Effective C++ from the same author (Scott Meyers).

That book follows the same model as the preceding. It seems that the entire book is made of several (35) ways to improve your C++ programs and designs. Again, the guidelines are separated into several chapters that I'll describe in the following paragraphs.

The first chapter (Basics) talks about the references and pointers, the C++ style casts and the arrays and polymorphism together.

The second one (Operators) will teach you how to be wary of the user-defined conversion functions and how to distinguish between postfix and prefix version of the increment operator. You'll also learn that some operators must not be overloaden.

The next chapter (Exceptions) will give you a lot of advices when working with exceptions. The chapter starts by telling the reader how to avoid resource leaks when working with exception-code. It also talks about how an exception is thrown and how to catch an exception in the right way. The point of the exception specifications is also addressed here.

The fourth chapter (Efficiency) will give you several guidelines to improve your program's performance. You'll learn how to avoid implicit conversions or facilitate the return value optimization. Another important guideline of this chapter is about the cost of several techniques that are used in C++ like multiple inheritance of virtual functions.

The next chapter (Techniques) is certainly the most advanced chapter of this book. I found this chapter less interesting and more dificult to read than the others. All the guidelines are very specific like limiting the number of objects of one class, reference counting or prohibiting heap-based object. These guidelines can be interesting if you really need one of the specific presented points.

The last chapter (Miscellany) talks about different things to improve the way you code. For example, you'll learn how to program in the future tense and how to combine C and C++ in the same program. You'll also familiarize yourself with the language standard.

I liked the previous book a lot, it was very instructive and very interesting to read, almost as easy as a roman to read. For this one, I'm less convinced. Indeed, some of the guidelines are very long and hard to read. I have to say that I didn't read all of the guidelines completely. Especially in the Techniques chapter, some of the guidelines are very very long and IMHO not very interesting. Perhaps, it's just me. In fact, I'm still a beginner in C++ and perhaps some of the guidelines are just too advanced for me and that makes them boring or hard to read, I don't know, but I won't recommend this book to everyone. Before buying this book, I recommend you to read the table of contents and to see if you're interested in every guidelines that the author proposes.

Comments

Comments powered by Disqus