[swift-users] Struct lazy Variable doubt

Pritesh Nandgaonkar prit.nandgaonkar at gmail.com
Fri May 27 04:15:17 CDT 2016


I have a struct with two properties one being Lazy and other being the
normal one.When I try to initialise the struct the init function
autosuggests the lazy property to be optional.Ideally the implementation
should be such that, only non lazy and non computed properties must have
been passed to the initialiser.Obviously this could be done through custom
init implementation.But would like to know why its not handled.

Have a look at the image for reference.

[image: Inline image 2]
-- 
Pritesh Nandgaonkar
Department of Electrical Engineering
IIT Bomba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160527/21847fcb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwiftMailingListLazyStructDoubt.png
Type: image/png
Size: 57723 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160527/21847fcb/attachment.png>


More information about the swift-users mailing list