Re: [swift-users] Is "lazy let" on the schedule anywhere?

2017-06-26 Thread Slava Pestov via swift-users
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 >

[swift-users] Is "lazy let" on the schedule anywhere?

2017-06-26 Thread Edward Connell via swift-users
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

Re: [swift-users] Is "lazy let" on the schedule anywhere?

2017-06-26 Thread Adrian Zubarev via swift-users
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