[swift-evolution] Support for pure setters
Joe Groff
jgroff at apple.com
Wed Feb 3 14:31:16 CST 2016
> On Feb 3, 2016, at 12:21 PM, Jessy Catterwaul <mr.jessy at gmail.com> wrote:
>
> Joe, to attempt to set foo.x doesn’t make sense. If foo cannot be gotten, a property of it will be inaccessible for getting or setting.
>
> Set-only properties are always computed, and only used via assignment.
>
> e.g. foo = value
I understand that. If that's all you're allowed to do with a set-only property, then this is just sugar over 'setFoo(value)', and I think the sugar implies you could do more with 'foo' than you really can. I don't think it's worth the complexity.
-Joe
More information about the swift-evolution
mailing list