Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Permalink for comment 548579
To read all comments associated with this story, please click here.
RE[7]: Point by point
by saso on Sun 13th Jan 2013 11:09 UTC in reply to "RE[6]: Point by point"
saso
Member since:
2007-04-18

I think you just consider it simpler because it's what you're used to. For instance, it would take me a good while to figure out what you said about comparesTo(), simply because I'm not used to it. Also, your example covers custom sorting of objects, but not of first class types - how do I do a custom sort on strings, or ints, or something else atomic? Sure, you could wrap the primitive types in custom object classes and incur a significant performance penalty (an array of 10000 int's is going to need 10000 malloc's and subsequent free's), in addition to adding tons of lines of code (plus a few new extra classes/files), whereas in C the problem could have been solved efficiently in about half a dozen lines of code with no extra allocation needed.

Reply Parent Score: 2