Implicit property synthesization needs more finely grained control.

Originator:satsumac
Number:rdar://12128510 Date Originated:18-Aug-2012 05:50 PM
Status:Open Resolved:
Product:Developer Tools Product Version:4.4.x
Classification:Enhancement Reproducible:n/a
 
The new Xcode does not require manual property synthesization anymore, which is a nice improvement.

However I'd much rather be able to manually control implicit synthesization on a per-class basis.

My proposal:

@interface MYObject : NSObject

@property (strong) NSString *foo;
@property (strong) NSString *bar;

@end

@implementation MYObject

// The next line enables implicit property synthesization for MYObject:
@synthesize;

// Optionally one could provide an ivar pattern:
@synthesize (_@);  // would be equivalent to "@synthesize foo = _foo; @synthesize bar = _bar;"

@end

Xcode would then add the "@synthesize;" line to each newly created class implementation by default (or even provide a project-wide setting via checkbox on project creation).
If one would rather not have any properties implicitly synthesized for a certain class, one would simply have to remove the "@synthesize;" from its implementation.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!