[swift-dev] Location of "indirect" declaration modifier
marc at knaup.koeln
Fri Dec 11 10:41:53 CST 2015
I also agree that requiring the developer to specify the modifier does make
sense esp. with the performance downsides and the generic issue described
The example with the recursive struct makes sense! I forgot that in my
cases either an enum, an Optional (so an enum) or a protocol were breaking
that init cycle for recursive variables.
lazy private(set) var will probably also work although it's use is likely
Now I do have a good sense what is possible and how.
Thank you very much, Slava!
On Fri, Dec 11, 2015 at 5:32 PM, Matthew Johnson <matthew at anandabits.com>
> > Also even if ‘indirect’ could always be inferred, it seems like a good
> idea to give the user control over where the indirection occurs — this can
> have an effect on the size of the enum value for instance.
> +1. Requiring it to be specified also prevents unintentional indirection.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-dev