[swift-evolution] [Review] SE-0030 Property Behaviors

David Hart david at hartbit.com
Fri Feb 12 17:22:48 CST 2016



> On 12 Feb 2016, at 03:32, Myles Schultz via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Having to use dot syntax every time doesn't feel right. When it comes to the having to use .clear(), that really doesn't feel right. Setting value to nil seemed so much cleaner and simpler. 

1) behaviors exist for implementing more than lazy, so making an argument about the calling syntax for 'clear' seems a bit too not picky for me.

2) In the case of lazy, the property's type is often not optional. So setting the value to nil is a non-sensical from a type-checker point of view.


More information about the swift-evolution mailing list