Hacker News new | ask | show | jobs
by abrahamsen 4589 days ago
That is really bad advice. C style memory management is useless in the presence of exceptions, and a nightmare to get right even in C. Choose a book that teaches RAII from the beginning, and leaves C style memory management to a late, advanced chapter.

Accelerated C++ used to be that book, don't know if there is a newer and better replacement.

1 comments

I agree that in modern C++ you need to avoid all the bare-C ways. Actually, my C++ is almost C# if you look at it, especially with the new c++11 standard.

But I still believe that to learn C++ the best way is to start with C, pointer arithmetic, and classic strings. Otherwise you will just miss the point and join the hordes of script kiddies who "once started C++".

I agree that understanding of pointer is essential to use C++, but the problem is many learning materials force learners to believe the have to use pointer everywhere - which is opposite in reality…

So there should be a good guidance of avoiding pointers as much as possible when learner is stepping to C++ from C.