If you’re not passing the value type as an inout, how will the ‘lazy let’
property write back the new value?
Slava
> On Jun 26, 2017, at 3:32 PM, Edward Connell via swift-users
> wrote:
>
> It sure would be nice if the compiler supported lazy lets for structs. Any
> idea when or if this will
It sure would be nice if the compiler supported lazy lets for structs. Any
idea when or if this will be supported?
Seems like a nice performance win, lazy var is a pain because you can't
access arguments passed into a function without mutation complaints.
Thanks, Ed
__
I myself highly want lazy constants (I’m tired of writing something like file
private private(set) lazy var propertyName: ReferenceType just to hide the
setter from the rest of the codebase), but I don’t think this will ever happen
in Swift, at least not as an improvement for the lazy keyword it