> On Jun 14, 2016, at 20:51, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> FWIW, I prefer to use the other form for setters, too. I don’t see why:
> 
>    self.animal = YES;
> 
> is any improvement over:
> 
>    self.isAnimal = YES;
> 
> even when it’s something less concrete, say:
> 
>    self.enabled = YES;
> 
> vs:
> 
>    self.isEnabled = YES;
> 
> As far as I’m concerned, if the “is…” or “has…” form is better for getters, 
> it’s better for setters too. (But it doesn’t seem like a religious matter.)

Why are you using a getter as a setter? 

If(!self.isEnabled)
    self.enabled = YES;

Or:

If(![self isEnabled])
    [self setEnabled:YES];

Steve via iPad


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to