3 ms·
I feel like treating C as a subset of C++ has done real harm to the language.
by Gibbon1 6y ago
I feel like treating C as a subset of C++ has done real harm to the language.
- rrdharan 6y agoWhich one?
- Gibbon1 6y agoNo arrays, no real strings. Pushing UB issues on the programmer instead of forcing the compiler maintainers to deal. No closures. Threading as a first class construct. No modules. Standard Library is increasingly a bad joke. What's happened is the direct opposite of C++ where every fad gets added to the language. With C lots of standard proven features don't make it into the language.
- rrdharan 6y agoHeh, yeah my point was you could plausibly apply your statement to both languages, i.e. their confusing coupling impedes both in different ways.
- simias 6y agoI agree that teaching C++ as "C and then some stuff on top" is probably a bad idea. But I also think that it's not technically incorrect to say that "C is mostly a subset of C++", at least as far as most C constructs will work in C++ with only minor tweaks. It's a bit like saying that operating the windscreen wipers is a subset of knowing how to drive a car. It's strictly correct, but it's probably not where you should start nor where you should put most of your attention if you're looking to get you license.