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."
Thread beginning with comment 548288
To read all comments associated with this story, please click here.
Objective-C
by saso on Fri 11th Jan 2013 00:39 UTC
saso
Member since:
2007-04-18

I really liked Smalltalk, but it was just too darn slow and unusable in the real world. Then, 10 years ago, I tried coding in Objective-C on Linux (with GNUstep) and I haven't changed back ever again. Since it's a pure extension on top of C, I can still write all of my low-level algorithms in C and the higher level constructs in Objective-C. And GNUstep (and OpenStep on which it's based) is really a freakin' great library. Even for non-graphical work it's super simple:

1) There are two classes implementing collections (NSArray, NSDictionary), not a bajillion.

2) The garbage collector is extremely predictable (ref counts).

3) The class hierarchy is very shallow (at most 1-2 superclasses for 95% of the entire library), so it's easy to memorize.

4) I can intermingle low-level concepts (e.g. sockets) with GNUstep constructs (NSFileHandle) and it works just fine.

5) The loose typing and built-in dynamic reflection makes many tasks super simple (e.g. -[NSArray makeObjectsPerformSelector:]).

All in all, the idea mix of high-level abstraction and low-level grunt for my taste.

Reply Score: 7

RE: Objective-C
by Hypnos on Fri 11th Jan 2013 04:06 in reply to "Objective-C"
Hypnos Member since:
2008-11-19

All in all, the idea mix of high-level abstraction and low-level grunt for my taste.

Indeed, C with an elegant Smalltalk-like OO extension -- you could do much worse.

Reply Parent Score: 2

RE: Objective-C
by dorin.lazar on Sat 12th Jan 2013 13:00 in reply to "Objective-C"
dorin.lazar Member since:
2006-12-15

1) There are two classes implementing collections (NSArray, NSDictionary), not a bajillion.

And are you sure you don't need other data structures? Like, you know, trees & such? Bitmaps?

2) The garbage collector is extremely predictable (ref counts).

You can write C++ code without ever using delete, using things like smart pointers (ref counted).

3) The class hierarchy is very shallow (at most 1-2 superclasses for 95% of the entire library), so it's easy to memorize.

The point of a framework is to offer you features, not to be small. You don't need to memorize it. You should always be able to access the documentation. Qt is this sort of framework that is elegant and can help you write clean code.

When did lack of features became such a great thing?

Reply Parent Score: 2