[swift-evolution] Extending init checks for property initialization

David Sweeris davesweeris at mac.com
Thu Apr 28 19:49:43 CDT 2016


> On Apr 28, 2016, at 11:50 AM, Vladimir.S via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I think I like this idea. It is clear that it is init() and 'defer' says that it is called at the end of each init. IMO we need exactly some kind of 'init' as only in init we can set un-initialized stored properties.
> 
> But, why implicitly unwrapped optionals are not solution here? I.e.

To avoid the extra overhead. Also, they’re sorta going away in Swift 3: https://github.com/apple/swift-evolution/blob/master/proposals/0054-abolish-iuo.md

- Dave Sweeris


More information about the swift-evolution mailing list