I agree. I think stored properties in extensions should only be visible in its 
scope. If we combine the idea with scope access modifier ( 
https://github.com/apple/swift-evolution/pull/64 ). We can make the rule that 
no stored property is allowed to expose from its extension.

Nutchaphon

________________________________________
From: Tino Heth <2...@gmx.de>
Sent: Wednesday, December 23, 2015 6:42 PM
To: Nutchaphon Rewik
Cc: ke...@mac.com; swift-evolution@swift.org
Subject: Re: [swift-evolution] Proposal - Allow properties in Extensions

+1/-1:

When the extension is in the same module, it's nice to be able to group all 
aspects of an extension in one place instead of being forced to declare 
properties in the definition.
But I guess the most important use case is to extend types that aren't in the 
same module, and I wouldn't like to see that hacking the runtime becomes a 
common thing to do.

Tino
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to