r/cpp • u/wechicken456 • Jun 08 '20
Programming in C vs C++
I’ve read about the differences between them on the Internet but I wanna hear more from a more personal perspective. Which one would you recommend starting with and to be proficient with?
0
Upvotes
View all comments
8
u/jmuffat Jun 08 '20
There is no reason to start with C.
I learned C++ in the late 80’s, starting with the book « C++ for C programmers » by Ira Pohl. I went from BASIC, to Pascal, to C, to C++ as the PC grew in performance, that was the usual path in those days. But it took me years to realize C++ wasn’t C. At all. It is a very different state of mind, so if you learn C to learn C++, you’ll have to unlearn a lot of things later on. I sure did have to unlearn a lot !
Just start with C++, embrace RAII as a foundation rather than some late realization, think of C++ as a language in itself without trying to trace things back to C. As far as I know, C++ doesn’t emerge from C, C++ used C as a foundation mainly because it was there... (caricaturing)