Skip to content

Files

Latest commit

bebe507 · May 31, 2022

History

History

Effective_CPP_ThirdEdition(Meyers)

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 31, 2022

This book was recommended by TheCherno who is a YouTuber that focuses on C++ programming whom I really like. So I thought it'd be a decent book to read. However this seems more like a book to read not really in the capacity of "I want to learn some new cool C++ tricks" or rather learning key C++ concepts in general, rather good practice that was used a while back, along with possibly some practices that remain.

The book's age really does show. The book was released in 2005. It seems like much of the things I've read so far were just review or outdated/unused methods. For example, Scott Meyers when giving an example for restricting some of the special member functions, declares them with the private access modifier. While this is okay, usually best practice as far as I'm aware is to explicitly mark them as delete-ed, this makes your intentions much more clear to yourself or whoever's reviewing/using your code. Another example is using auto_ptr as an exemplary memory management example. auto_ptr was outright deprecated in C++11 and then removed wholesale in C++17. Although Scott introduced shared_ptr somewhat, most of what I read used auto_ptr.

I didn't know about the enum hack before being introduced to it in this book, so this goes to show that you can still learn new things from an old source. However, I'm not currently aware of whether static const variables are best practice now rather than the enum hack. The book states that the enum hack in a way gives the best of both worlds, where you can have the benefits of a constant variable/member, without having to allow people to create a pointer to it such as with a #define macro.

The first couple chapters were essentially just review and or outdated material that I've already learned, so I somewhat speed read over what I've already learned as to what's currently taught vs what was taught almost two decades ago. For now, this will sort of act as somewhat a review, as I'm only in chapter 3 out of 9, however I can't really assume I'd get much benefit for now out of this, as I have much more material to read that is more up to date and focused on teaching more C++ programming, and I'd like to get to that material first, before reviewing this more passive "suggestive" (in the sense of giving suggestions/ideas for better programming style/practice) material. I'll probably find a time to finish this review, however, again, I have much much more material to go over, so it'll be quite a while before I'll be dusting this off.