Re: Referring to self in property initializer
Re: Referring to self in property initializer
- Subject: Re: Referring to self in property initializer
- From: Jens Alfke <email@hidden>
- Date: Fri, 14 Aug 2015 17:26:04 -0700
> On Aug 14, 2015, at 4:32 PM, Quincey Morris <email@hidden> wrote:
>
> No, there’s no instance here. “Enclosing” doesn’t really make any sense.
It’s in the declaration of the ivar, I mean ‘stored property’, backgroundSession, so there is an instance.
But I just realized that Rick forgot the “lazy” keyword. Without that, I think the block executes at initialization time, not when the property is first accessed. (Either way, it would still make sense for ‘self’ to be available.)
—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