[swift-evolution] Pitch: Partial Implementations

Slava Pestov spestov at apple.com
Thu Mar 23 15:36:26 CDT 2017

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170323/4699cd34/attachment.html>

More information about the swift-evolution mailing list