> On 23 Mar 2017, at 21:36, Slava Pestov via swift-evolution 
> <[email protected]> wrote:
> 
> 
>> On Mar 23, 2017, at 11:21 AM, Matthew Johnson via swift-evolution 
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
>> 1) Allow stored properties in same-module extensions.  This has been 
>> discussed in the past and is a possibility, but I suspect it is not in scope 
>> for consideration during Swift 4.
> 
> Allowing stored properties and overridable methods in same-*file* extensions 
> would be trivial to implement.
> 
> Same-module extensions are still tricky to generalize because in non-WMO 
> mode, the class (and its metadata, such as stored property layout and vtable) 
> could be emitted in a different translation unit than the extension, so we’d 
> have to ’stitch’ together the definitions somehow and deal with the lack of 
> static knowledge of things like the size of the class and the virtual methods 
> it defines.
> 
> Slava
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

I think limiting it to same-file extensions should be enough to handle most 
cases. It’s good that it keeps it local to the original declaration, since it 
would affect things like implicit initialisers.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to