Other Sellers on Amazon
+ Free Shipping
+ $3.99 shipping
Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 1st Edition
|New from||Used from|
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
From the Publisher
From the Introduction
If you’re an experienced C++ programmer and are anything like me, you initially approached C++11 thinking, “Yes, yes, I get it. It’s C++, only more so.” But as you learned more, you were surprised by the scope of the changes. auto declarations, range-based for loops, lambda expressions, and rvalue references change the face of C++, to say nothing of the new concurrency features. And then there are the idiomatic changes. 0 and typedefs are out, nullptr and alias declarations are in. Enums should now be scoped. Smart pointers are now preferable to built-in ones. Moving objects is normally better than copying them.
There’s a lot to learn about C++11, not to mention C++14.
More importantly, there’s a lot to learn about making effective use of the new capabilities. If you need basic information about “modern” C++ features, resources abound, but if you’re looking for guidance on how to employ the features to create software that’s correct, efficient, maintainable, and portable, the search is more challenging. That’s where this book comes in. It’s devoted not to describing the features of C++11 and C++14, but instead to their effective application.
The information in the book is broken into guidelines called Items. Want to understand the various forms of type deduction? Or know when (and when not) to use auto declarations? Are you interested in why const member functions should be thread safe, how to implement the Pimpl Idiom using std::unique_ptr, why you should avoid default capture modes in lambda expressions, or the differences between std::atomic and volatile? The answers are all here. Furthermore, they’re platform-independent, Standards-conformant answers. This is a book about portable C++.
The Items in this book are guidelines, not rules, because guidelines have exceptions. The most important part of each Item is not the advice it offers, but the rationale behind the advice. Once you’ve read that, you’ll be in a position to determine whether the circumstances of your project justify a violation of the Item’s guidance. The true goal of this book isn’t to tell you what to do or what to avoid doing, but to convey a deeper understanding of how things work in C++11 and C++14.
About the Author
For more than 20 years, Scott Meyers’ Effective C++ books (Effective C++, More Effective C++, and Effective STL) have set the bar for C++ programming guidance. His clear, engaging explanations of complex technical material have earned him a worldwide following, and they keep him in demand as a trainer, consultant, and conference presenter. Winner of the 2009 Dr. Dobb’s Excellence in Programming Award, he has a Ph.D. in Computer Science from Brown University. His web site is aristeia.com.
- Item Weight : 1.25 pounds
- Paperback : 334 pages
- ISBN-10 : 9781491903995
- ISBN-13 : 978-1491903995
- Dimensions : 8.5 x 0.76 x 11 inches
- Publisher : O'Reilly Media, Incorporated; 1st edition (December 5, 2014)
- ASIN : 1491903996
- Language: : English
- Best Sellers Rank: #59,426 in Books (See Top 100 in Books)
- Customer Reviews:
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The book examines extreme corner cases in C++ in which you could get into trouble. It assumes you already a highly experienced C++14 programmer. Language in the book is incredibly difficult, and it starts in the beginning. For example on page 16 there is some convoluted example, followed by a comment: "Yes, the syntax looks toxic, but knowing it will score you mondo points with those few souls who care."
It only gets harder from here. Meyers presents topics as if you on the same level as him, so it is written like you have 20+ years of experience in C++ and know every single language feature perfectly. I found myself having to re-read so many sentences over and over that I just kind of gave up trying to understand and kept on reading.
In many chapters the object used to explain the tip is called Widget and the functions are named something like doWork(). I would have preferred more concrete examples.
The book abrupty ends on tip 42 and there is no conclusion. For someone who has worked with C++ as long as Meyers I would have expected more here in terms of a meta-view. Surely he has some opinion on where the language is headed?
This might be a 5-star book for the most experienced of C++ programmers, but if you are just looking to brush up your C++ skills this will be too hard.
I often found the examples tending toward opacity. There were lots of "but this could be done better" comments on many, and getting down to the details sometimes got difficult. And, although, the new features tend towards brevity and towards elimination of redundant declarations, they sometimes work against easy understanding of the code. So, on the whole, it says things that matter. Many could have been said better, though, and some things need to be taken in moderation.
If you're brand new to C++, I would recommend reading either Meyer's older Effective C++, C++ Primer, or Stroustrup's novice book (Programming and Principles Using C++) to get the most out of this book. While this book is probably my favorite of all C++11 books, its targeted audience appears to be towards developers that have at least worked with C++98 before and have strong understanding of the basics.
I should elaborate one thing for people who consider purchasing this book. This book does NOT immediately give you a solution to the piece of code you are developing, the bug you are fighting, or the homework you have to turn in this week. That's not what this book is about. Instead, this book helps you cultivate your internals as a C++ programmer to write more correct, compact, and maintainable code, which you would appreciate over time, not today.
Top reviews from other countries
Having said that, even the easier bits of the book are very valuable and provide an in depth understanding of those newer elements of C++ that you are more likely to encounter and use frequently.
Following the successful pattern from the earlier 'Effective' books the bite sized items provide well-rounded guidance for using the new features when programming in C++.