![]() |
|
Should I learn C before learning C++? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.li/Forum-C-C-Obj-C) +--- Thread: Should I learn C before learning C++? (/Thread-Should-I-learn-C-before-learning-C) |
Should I learn C before learning C++? - Skorp - 07-14-2016 I am interested in learning C++. Would I be better off learning C before starting to learn C++? RE: Should I learn C before learning C++? - insidious - 07-14-2016 Learning C is not strictly a requirement for learning C++. It doesn't give you any edge. If you already know C, then you already know a good part of C++. Congrats. Basically just have to learn the OOP elements of C++ and you're good to go. But if you don't know C and want to learn C++, you don't need to 'waste' your time learning C. It's not really going to help in learning C++ because the part C would help with is so similar that you're just going to be repeating lessons. but maybe @0xDEAD10CC has something to say on this matter, he seems really experienced from what i've seen of him here. RE: Should I learn C before learning C++? - Skorp - 07-14-2016 (07-14-2016, 03:28 AM)insidious15 Wrote: Learning C is not strictly a requirement for learning C++. It doesn't give you any edge. Thanks for the reply. I will heed your advice and go straight to learning C++. RE: Should I learn C before learning C++? - Mr.Kurd - 07-27-2016 learn C++ and say thank god RE: Should I learn C before learning C++? - 0xDEAD10CC - 07-31-2016 Learning C is not a requirement at all for learning C++ and if you are advanced enough in C, you'll know that you can't just take all C code and have it behave in the same way as C++. However, if you know the nuances of C++ and the differences between the languages, C will give you a better understanding on how the C++ STL works among other things. Knowledge of C unless you enjoy learning about what makes things work will help you to write optimized C++ code too. There are a lot of things that make C++ difficult however, and with every standard of the language this is even more so true. A beginner trying to learn C++14 for instance will have a very hard time trying to grasp concepts like smart pointers (RAII), perfect forwarding, L/R-value references (and others), move semantics, type deduction with auto and decltype combined; all features that have progressed from early C++, to C++11, to C++14, among many other functions that were introduced for such things. In C, you deal with a much smaller standard library, pointers, and a lot of arithmetic. In C++, you deal with encapsulations of certain functionality that does most of the heavy lifting for you through many abstractions, and trying to figure out why some code doesn't work depending on how complex and layered those abstractions are can be tricky at times because you might end up with a bible of compiler errors that you'll have to look through in attempt to understand what line gives you the best idea of what the problem is. |