[swift-evolution] Proposal - Allow properties in Extensions
kevyk at mac.com
Wed Dec 23 10:02:47 CST 2015
I don’t think hacking the runtime is much of an issue, more that it might already be now.
However part of the thinking behind the idea of extending extensions to encompass property declarations, above and beyond grouping related code together, is to maintain orthogonality: Structs and classes can declare properties and so should extensions to such types be able to as well.
> On Dec 23, 2015, at 3:42 AM, Tino Heth <2th at gmx.de> wrote:
> 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.
More information about the swift-evolution