Linked by Jared White on Thu 24th Apr 2003 17:49 UTC
Permalink for comment
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/25/13 0:45 UTC
Linked by Thom Holwerda on 05/24/13 23:59 UTC
Linked by Thom Holwerda on 05/24/13 22:33 UTC
Linked by Howard Fosdick on 05/24/13 21:41 UTC
Linked by Thom Holwerda on 05/24/13 14:44 UTC
Linked by Thom Holwerda on 05/23/13 23:22 UTC
Linked by Thom Holwerda on 05/23/13 22:04 UTC
Linked by Thom Holwerda on 05/23/13 22:01 UTC
Linked by Thom Holwerda on 05/23/13 17:52 UTC
Linked by Thom Holwerda on 05/22/13 22:23 UTC
More News »
Sponsored Links



Sorry, but I do find the [] syntax confusing, as it's never clear what is the method and what are the arguments.
Well in the beginning I had difficulties too, I didn't "got it". In fact, it's really simple :
[myObject messageWithArgument1: foo andArgument2: bar];
the function's name (function signature, or selector) is NOT
messageWithArgument1:
as you could think, but :
messageWithArgument1:andArgument2: !
In fact, you put your arguments "inside" the method's name/call ... it's not simply that you "name" the argument, the "argument's name" is part of the method's name.
I've not seen anybody mentioned the big disadvantage of Objective-C, in that it's very slow.
It's not "very slow". It's a compiled language, and frankly I don't see the difference when programming with GNUstep or with Qt. I "know" that methods invocations are a bit slower due to indirection, but it's barely noticeable. I think that today's computer are too fast ;-) (and remember, NeXT ran on 68030, and their eventual slowness was mostly due to DisplayPostscript, not ObjC). Anyway, the biggest problem due to rapidity in a program is generally due to a bad algorithm/architecture rather than the language itself.
And of course, if you want, it's trivial to "cache" the method call, thus no more indirection, it's as fast a standard C function call !
You could easily use directly C if you care so much (never had the need to do that in fact).
Python has the advantages of a non-confusing syntax and true garbage collection.
Personnally I can't stand the tab thing with Python... ;-)
But what's your thing with garbage collection ? With GNUstep, you are free to use a real garbage collector instead of retain/release ! (Mac OS X can't, yes, but it's available on GNUstep).
But strangely, retain/release/autorelease is more used anyway (I think that's because it's quite simple mechanism, efficient, and far painless than C memory handling, and not very complicate).