I have noticed as a rather recurring trend that quite a few people seem to recommend learning C before learning C++.
When I was starting out, the option was basically taken from me ( C++ was fairly new and compilers were scarce ), so I never had to make this decision. I have my own opinion on the subject now, but I don't want to taint the thread with it. So I was hoping to do a quick survey.
Questions:
Do you recommend a new developer learn C before C++?
What skill level would you consider yourself in C++ today?
Why? ( either way EDIT: Why as in do you recommend for/against C++ first, now why do you consider yourself a certain skill level. ;) )
I will go against many folks and say that I agree with learning C first but with a couple differences. First off, learn "C" in the context of "C++". I.e. use cpp/cxx files so the compiler assumes C++ and use the syntactic sugar which C++ allows such as creation of variables as needed instead of all defined at the head of the function. There is no effective difference in the generated code and in this specific example, C++ can actually be more efficient since it won't expand the stack until needed and may keep core variables in cache longer due to the "expand only as used" behavior. (Not all compilers respect this as it can be a detriment, depends on the function and the compiler's belief of which is better. Key item here, trust your compiler until it proves to be wrong....)
The second reason I suggest the above is the primary item I have to explain to new programmers multiple times. "Pointers" and how they work. Pointers are so simple yet the language makes them complicated for various reasons. How can uint8_t* ++ =1, uint16**++=2 etc and how struct/class*++ doesn't match anything you might expect. How can temp[ 80 ] be used the same way as generic pointer math or temp[ 80][ 80] etc. Pointer math is rather arcane and the only thing I really care folks learn before digging into other areas is that they have a VERY solid pointer math understanding as it is critical to a lot of higher level usage of the language.
Finally, solid understanding of the language. I don't think ANYONE should code OO, virtuals, templates, etc until they REALLY understand the general base language of 80ish keywords.
As to the alternative ways to learn programming in general, sure fine whatever. Learn Python, Java, whatever, but to make the jump to C++, is a very large change and as the Spidey paraphrase goes: "With power comes responsibility". It is your responsibility to learn the basics before jumping into the fancy stuff because you can so easily screw things up.