[swift-evolution] [Proposal] Property behaviors
me at tal.by
Wed Jan 13 19:05:26 CST 2016
`var [lazy] foo = 123` maybe the accessor could be `foo.[lazy].clear()`
On Wed, Jan 13, 2016 at 6:14 PM, Joe Groff <jgroff at apple.com> wrote:
> > On Jan 13, 2016, at 2:37 PM, Tal Atlas <me at tal.by> wrote:
> > For var [lazy] foo = 1738 how does the user or compiler know that foo,
> even though it’s an Int, it has a property called `lazy` on it.
> If name lookup has visibility of the behaviors, it can handle them as a
> special case.
> > And what happens if that object type has a property named `lazy` already?
> Good question. We can either overload the name and let type context sort
> it out, or consider an alternative syntax for accessing members.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution