@Russell Finn: How would your hypothetical scientist feel about using actual Objective-C syntax, which would look more like [z plus: w]
This is a good point because the Objective-C 2.0 dot syntax does not support methods with arguments like object.add(1,2) or even object.print(1). It's designed for property setters and getters: object.name = @"Leopard";
NSLog(@"name: %@", object.name);
Messages that do not involve the setting and getting of properties still look like this in Objective-C 2.0: NSString *newString = [string stringByAppendingString:@"New String"];
by Scott Stevenson — Sep 15
How would your hypothetical scientist feel about using actual Objective-C syntax, which would look more like [z plus: w]
This is a good point because the Objective-C 2.0 dot syntax does not support methods with arguments like object.add(1,2) or even object.print(1). It's designed for property setters and getters:
object.name = @"Leopard"; NSLog(@"name: %@", object.name);
Messages that do not involve the setting and getting of properties still look like this in Objective-C 2.0:
NSString *newString = [string stringByAppendingString:@"New String"];