On thing I find odd about the new Objective-C 2.0 properties is the duplication of effort. For example on the Objective-C 2.0 Overview page is the following code.
@interface Person : NSObject {
NSString *location;
}
@property NSString *location;
@end
Why is NSString *location written twice?
Why isn't the property written as: @property location?
The implementation doesn't need to mention the property type.
@implementation Person
@synthesize location;
@end
by Simon Robins — Oct 27
@interface Person : NSObject { NSString *location; } @property NSString *location; @end
Why is NSString *location written twice?
Why isn't the property written as: @property location?
The implementation doesn't need to mention the property type.
@implementation Person @synthesize location; @end