[swift-evolution] [Idea] Make lazy an attribute
davesweeris at mac.com
Mon May 2 16:25:17 CDT 2016
Yeah, I was just thinking that we should get the “call-site” syntax settled for property behaviors, for exactly that reason.
> On May 2, 2016, at 3:39 PM, Антон Жилин via swift-evolution <swift-evolution at swift.org> wrote:
> One of proposals that will probably be submitted for Swift 4, will be Property Behaviors propoal.
> It aims to generalize @IBOutlet, @synchronized, @delayedinit, and of course, @lazy.
> (Side note: it would be great if it also included unowned)
> Because we aim for less breaking changes in Swift 4, we should prepare ground for it.
> The suggestion is to rename `lazy` to `@lazy`.
> Besides the aforementioned reason, I think, lazy really has its place among attributes.
> It does not change type of property, it just helps to delay side effects of initialization.
> - Anton
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution