>>
|
No. 240
>>238
C and C++ carry subtle differences such that learning one will trip you up occasionally while learning the other. There are a couple things that need to be considered when choosing whether to learn C or C++.
First: What do you want to do? Let the goal determine the tools used to achieve it. Unless, of course, you just want to learn a new programming language. In that case, flip a coin.
Second: It's important to understand that the C programming language is small and generally easy to learn, but Bjarne Stroustrup, the creator of C++ has openly stated that the C++ language is so big no single programmer can be expected to know all of it. On the other hand, there's no doubt the C++ language has more power than C alone. Would these trade-offs matter to you?
Learning either C or C++ will force you to pay attention to what you're doing, especially with things like memory allocation. Garbage collectors exist for both languages, but in the end you'll be expected to do a lot of things manually that a language like Python will take care of on its own. This is especially true with C++, which is so open to mistakes that Google published a document on how to use C++ in Google-based projects. You can view it here:
https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
The thing about C++ is this: once you really get good at it, you'll have developed the mindset and skills necessary to jump to most other languages. The reason for this is that in order to really pull off C++ development, you have to think about what you're doing, develop plans, and be able to change course as necessary. This is true of all languages, but for a language as complex as C++ this is especially necessary. Since Android is the hot thing right now, you might want to check out Google's style guide if you're going to learn C++. From a security standpoint you might also want to look at CERT's procedures for secure C++ coding:
https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637
Anyway, that's just my two cents. Hope it helps.
|