Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Objective-C

Name: Anonymous 2009-02-22 2:30

Any Objective-C programmers here?

I'm reading up on dot notation. How come this

[object method:arg1, arg2]

can't be replaced by

object.method(arg1, arg2);

??

Name: Anonymous 2009-02-22 15:50

>>13
In Objective-C 2.0 the dot operator can be used as shorthand for accessing object properties.

i = obj.foo is shorthand for i = [obj foo]

and

obj.foo = i is shorthand for [obj setFoo:i]

And it really only is shorthand - the same things will happen under the hood. If you're unfamiliar with Objective-C and the Foundation framework you'll probably think this is terrible!, but this is what makes e.g. key-value coding work. And that shit is where the V-TEC really kicks in, yo.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List