[swift-evolution] Proposal - Allow properties in Extensions
matthew at anandabits.com
Wed Dec 23 10:15:46 CST 2015
> On Dec 23, 2015, at 10:02 AM, Kevin Kachikian via swift-evolution <swift-evolution at swift.org> wrote:
> 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.
The problem I think we need to consider carefully is that introducing stored properties is not necessarily orthogonal. It can have significant impact on all initializers.
>> 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.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution