5 ms·
(Speaking as one of those people who did choose to write C over C++...) People choose C over C++ because C is a simpler language than C++, something which this
by qwph 18y ago
(Speaking as one of those people who did choose to write C over C++...)
People choose C over C++ because C is a simpler language than C++, something which this new standard does nothing to address.
- kingkongrevenge 18y agoI have difficulty handling the complexity of typical C code due to the lack of abstraction. C always winds up with huge functions and lots of hard to grasp state up in your face. C++ gives you way more opportunities to hide away complexity.
- qwph 18y agoC always winds up with huge functions and lots of hard to grasp state up in your face. That's something I've never found to be the case. Most of my C functions are 5-15 lines long. Anything more than 20 lines long is a candidate for refactoring - the unit tests will tell you if you've broken anything.
- tptacek 18y agoThe solution to complexity is to eliminate it, not to hide it. You've nailed the big problem with C++ right there.
- kingkongrevenge 18y agoI really don't know what that means...
- earthboundkid 18y agoThink of it like this: Would you rather have an operating system that has a bunch of little ads in the corner by the clock that are periodically "hidden" under a chevron, or would you rather that the crap wasn't there in the first place?
- scott_s 18y agoSome complexity is inherent to the problem and you can't get rid of it. You can only manage it through abstractions.
- DarkShikari 18y agoAny good programmer can write good abstraction in any language--including C. If your functions are huge, you should rethink your design, regardless of the language.