9 ms·
I think C models how the computer works a lot more closely than C++ (and no one would argue that C isn't carrying water out in the engineering world even today)
by dschobel 17y ago
I think C models how the computer works a lot more closely than C++ (and no one would argue that C isn't carrying water out in the engineering world even today). IMO C++'s issue is precisely that it layers all of these leaky abstractions on top of the strict procedural model of C.
For my money, developers are better off knowing two tools (c + some very high level language) rather than the spork which is C++.
- jacquesm 17y agoI remember 'cfront', when it first came out, and to this day I haven't really changed my mind on how I felt about it, it's a much too bloated language compared to the elegance of C. If 'C' would have had a decent native string type I think C++ might not have happened ;)
- aminuit 17y agoAre you suggesting that std::string, or as my not-so-friendly c++ compiler likes to call it std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>] is an improvement? :-)
- jacquesm 17y agoNo, not at all. I was thinking of strings the way Dennis Ritchie would have done it. I can see why they chose to omit it, but in retrospect I think it was a mistake. The problem they were faced with was that the language didn't include any 'runtime' at all the way they wrote it, a string package would have made it a must to have some runtime. Everything that is 'runtime' in C is in libraries, and everything that is 'core' is in the compiler.
- fauigerzigerk 17y agoThat's not what your compiler calls the string class. That's what it calls one particular constructor of the string class. This constructor lets you customize the way the string class allocates memory. Now I would like to see the equivalent constructor in your favorite language :)
- yters 17y agoc + lisp, in my case. nice way to write DSLs.
- snprbob86 17y agoThe sad part is that there are a few good ideas in C++, so it is hard to throw out the baby with the bathwater. I use C++ like C with destructors, operator overloading, typed constants, and not much else.
- citizenparker 17y agoThus proving the author's point.
- lacker 17y agoBut C with vector, string, hash_map, const&, destructors and scoped_ptr is a pretty good language! It's certainly better than plain C. It's just not as aesthetically pleasing that it sits inside the larger monstrosity that is C++.
- omouse 17y agoassembly more closely models how the computer works than anything...