4 ms·
Learn C first! You'll understand why C++ is what it is and you'll also get the skills needed to contribute in a lot of open-source projects.
by nnq 13y ago
Learn C first! You'll understand why C++ is what it is and you'll also get the skills needed to contribute in a lot of open-source projects.
- pjmlp 13y agoPlease don't! Learn Modern C++ instead, otherwise you will be damaged with Cisms in C++ land.
- rbanffy 13y agoWould you like to elaborate on that?
- pjmlp 13y agoThere are lots of C constructs that are considered bad practice in C++ - null terminated strings - plain vectors - manual management of resources (memory, files, db connections, locks...) - C style casts - pre-processor instead of using inline/const/templates - the C subset of C++ it is also not 100% compatible with C, there are a few cases with different semantics - since C99, new language constructs are added via macros, instead of keywords - no use of namespaces - lack of safety of parameters that can be changed (pointer vs reference parameters) The best way to learn C++ is to read books like "Modern C++ Design", "Programming -- Principles and Practice Using C++" and the recently published "Tour of C++".
- swift 13y agoI have to take issue with your inclusion of "Modern C++ Design" in a reading list about learning C++. If you're new to C++, that is exactly the sort of thing you _shouldn't_ be reading. "Modern C++ Design" is really intended for advanced C++ programmers only. I don't feel it gives a very good impression of the language to new developers - there are so many awful hacks in that book. It's the sort of thing that you should hold off on until you have the experience with the language necessary to be wise about when such techniques are appropriate.