[swift-evolution] Enhanced Existentials
dgregor at apple.com
Wed Jan 4 22:48:36 CST 2017
Sent from my iPhone
> On Jan 3, 2017, at 10:08 PM, Rod Brown via swift-evolution <swift-evolution at swift.org> wrote:
>> On 3 Jan 2017, at 11:33 pm, David Hart via swift-evolution <swift-evolution at swift.org> wrote:
>> Hello Mailing-list,
>> I remember we discussed enhanced existentials heavily during the Swift 3 timeframe but postponed it. I was wondering if we need to bring back for discussion during Phase 1 or Phase 2? For reference, here is the proposal which Austin Zhend wrote which represented the culmination of the discussions:
>> swift-evolution mailing list
>> swift-evolution at swift.org
> I'm a big proponent of this - it's a limitation that is actually more capable in Obj-C than it is in Swift, and considering Swift's increased focus on Protocols, this seems rather baffling!
Yes. My personal feeling on this is that the ability to create an existential type with both superclass and protocol constraints is something we should address in Swift 4, because Objective-C APIs that use the feature (e.g., have a type like UIController<UIWhateveDelegate>) get weakened when they come into Swift. Fixing it is a source-breaking change, and I want to get it out of the way in Swift 4.
> Would love to see this come forward into discussion.
Yeah. I'm less sure about the other enhancements to existentials fitting into Swift 4, e.g., the creation of existentials for protocols with associated types. Although important, it's a big feature that will take a bunch of design and implementation time, and I'm leery of accepting something that we might not actually be able to achieve.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution