Re: Looking at self = [super init].
Re: Looking at self = [super init].
- Subject: Re: Looking at self = [super init].
- From: Jens Alfke <email@hidden>
- Date: Tue, 02 Jun 2015 13:31:58 -0700
> On Jun 2, 2015, at 1:28 PM, Charles Srstka <email@hidden> wrote:
>
> Dogs don’t completely lack color vision. Also, calling a person a dog could really come across in a way that you’re not intending.
Sorry, not intended! I was thinking more of “On cocoa-dev, no one knows you’re a dog”.
> Anyway, yes, one could ugly up one’s code with italics and boldface and whatnot, but simply prefixing the ivar name with an underscore is simpler, it prevents accidentally referencing the ivar and/or shadowing it with a local variable, and it’s what Apple recommends. Better all around, if you ask me.
I agree, actually. But in Swift the concept of ivar no longer exists, so I have to rely on color/style to distinguish properties from locals.
—Jens
_______________________________________________
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