Which one is better C or C++

Russ, can I have your babies? (It's an intro to C class, he said to NOT use malloc for the first assignment, and he's just being a dick. However, setting the stack that way worked. Whee. I love you.)
 
ERP said:
Most of the best C++ programmers I've worked with have been C programmers first.

I tend to think that for someone trying to learn C++ it's much better if he/she never even saw C before. It takes quite an effort in the beginning to get away from the C way of thinking and into OOP.
 
I think it's less to do with C++ people first seeing C as much as it is about people getting into OOP and first getting used to structured programming. I've seen plenty of coders who've not seen C prior to C++, but knew Pascal really well, and had little trouble learning C++. And if you're talking about a teaching tool for training people to do structured programming, Pascal is a wonderful language.

It's just that learning things like OOP and templates and such is easy enough, but learning the finer points and minor annoyances that come with, say, extern functions in an ASM file or linking in ill-documented 3rd-party libraries and such are all the sort of thing that can only come with experience. I wouldn't expect the hobbyist programmer or the CS student to have seen these sorts of things as often because the projects are too lone-wolf style.
 
_xxx_ said:
ERP said:
Most of the best C++ programmers I've worked with have been C programmers first.

I tend to think that for someone trying to learn C++ it's much better if he/she never even saw C before. It takes quite an effort in the beginning to get away from the C way of thinking and into OOP.

The problems I see with C++ programmers basically amount to a poor understanding of good OO design. They understand how all the tools work, just not when it's a good idea to use them. It's the when you have a hammer, everything looks like a nail syndrome. C programmers IMO at least tend to have a better basis to work from and tend to not obfuscate solutions with overly complex design.

Old school assembler programmers are even better, mostly because if you've ever written say 30K lines of assembler, you either realise pretty quickly that readable code and solid design are paramount, or you simply fail to deliver.
 
The Baron said:
Russ, can I have your babies? (It's an intro to C class, he said to NOT use malloc for the first assignment, and he's just being a dick. However, setting the stack that way worked. Whee. I love you.)

its an INTRO class, but in order to get it to work you had to force a value to the compiler.... wierd.
 
Back
Top