Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is effective C++ still effective?

From what I saw in this post I decided to start reading the book Effective C++.

But now that there are many new features because of C++11 and that a few of the good practices changed, I'm not sure whether or not it is actually a good idea. Has the advent of C++11 deprecated any of the advice contained in Effective C++? If so, which topics should I avoid?

like image 286
German Capuano Avatar asked Jul 25 '13 19:07

German Capuano


People also ask

Is C still used in 2021?

The answer is yes. Right now, C++ is the 4th most popular language in the world, according to the TIOBE index. It's used in various areas where high-performance software is needed.

Is C still relevant today?

Despite the prevalence of higher-level languages, the C programming language continues to empower the world. There are plenty of reasons to believe that C programming will remain active for a long time. Here are some reasons that C is unbeatable, and almost mandatory, for certain applications.

Is C still used in 2020?

C/C++ is still powering the world despite number of new high level programming languages. Most of the major software applications including Adobe, Google, Mozilla, Oracle are all written in C/C++. There is a complete article on list of best applications written in C/C++.

Is effective CA good book?

It is a good book for learning and referencing C. Effective C - Robert C Seacord (2020). A good introduction to modern C, including chapters on dynamic memory allocation, on program structure, and on debugging, testing and analysis. It has some pointers toward probable C2x features.


2 Answers

This what Scott Meyers himself had to say about it on his own blog

Which may lead you to wonder whether the information and advice in this pre-C++0x edition of Effective C++ remains relevant. I'm pleased to report that it does. Surprisingly so, in fact. Having spent nearly two years steeped in the details of C++0x, I expected to groan a bit as I reviewed this book's table of contents with C++0x in mind. Surely some Items would be inappropriate. But the advice I found proved sound. Should C++0x developers prefer consts, enums, and inlines to #defines (Item 2)? They should. Should they prevent exceptions from leaving destructors (Item 8)? Certainly. Should they use objects to manage resources? Declare data members private? Consider alternatives to virtual functions? Factor parameter-independent code out of templates? (Items 13, 22, 35, and 44.) Yes, yes, yes, yes! My goal has always been for Effective C++'s table of contents to summarize the advice in the book, and that summary remains just as applicable to C++0x development as to “traditional” C++ development. C++0x is a bigger language, and in some ways it's a different one, but the core techniques for making effective use of “old” C++ are core for the effective use of C++0x, too.

This doesn't mean that this Effective C++ is a perfect match for C++0x. The book doesn't discuss features new to C++0x, so Items about making effective use of those features are missing. A C++0xified Effective C++ would certainly have Items devoted to move operations, to uniform initialization, and to lambda expressions, and it'd probably have an entire chapter on making effective use of the concurrency API. Such a book would also contain different examples, e.g., ones making use of auto variables, range-based for loops, in-class default initializers, as well as the occasional variadic template. To the extent that this book falls short in its support for C++0x, the errors are those of omission, not commission.

UPDATE: the new title Effective Modern C++ has been for sale since November 2014 from O'Reilly and Amazon (and many others that you can google for).

like image 170
TemplateRex Avatar answered Sep 22 '22 05:09

TemplateRex


Yes, definitely still worth reading. There is a new book that Scott is working on: Effective C++11, which concentrates on C++11 only code. The Effective C++ is still very relevant, and is not superseded by the new book. Buy it, read it, enjoy :)

like image 34
cdmh Avatar answered Sep 22 '22 05:09

cdmh