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 10:41

>>1
Because SmalltalkObjective-C uses labeled arguments.

obj.method("bar", NULL, NULL, TRUE, 17, "quux");

vs.

[obj method:"bar" stackroot:NULL pizza:NULL macfag:TRUE aids:17 duckname:"quux"];

Objective-C object pointers are dynamically typed under the hood, so this is the only way to overload method names anyway.

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