3 ms·
I believe dguaraglia is talking about the types of arguments, which are often included in the method name. So you get things like [guy eatFood:food withHand:han
by chc 14y ago
I believe dguaraglia is talking about the types of arguments, which are often included in the method name. So you get things like [guy eatFood:food withHand:hand usingEatingStyle:eatingStyle]. Overall, it lends itself to exceptionally long lines of code, such that Objective-C message sends are often broken into multiple lines with lots of info on the right side of the window. For example, instead of:
NSWindow *window = [[NSWindow alloc] initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen];
people will often write write:
NSWindow *window = [[NSWindow alloc] initWithContentRect: desiredRect
styleMask: windowStyle
backing: NSBackingStoreBuffered
defer: YES
screen: [NSScreen mainScreen]];
The length of the selector requires us to choose how we're going to write this line of code.