Re: Properties: A question of style
Re: Properties: A question of style
- Subject: Re: Properties: A question of style
- From: Quincey Morris <email@hidden>
- Date: Tue, 14 Jun 2016 18:51:20 -0700
- Feedback-id: 167118m:167118agrif8a:167118saRidlag0n:SMTPCORP
On Jun 14, 2016, at 16:48 , Graham Cox <email@hidden> wrote:
>
> n.b. I’d always use the latter form for read/write properties
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.)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden