> On Mar 23, 2017, at 11:21 AM, Matthew Johnson via swift-evolution 
> <[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

Reply via email to