[swift-evolution] Generalized Existentials / Type Erasers
david at hartbit.com
Tue Jan 31 06:27:38 CST 2017
The topic has been heavily discussed last year, culminating into a massing proposal by Austin Zheng:
The proposal was never merged and postponed for a future Swift release. This feature is very important for me so I reopened it earlier this month:
Douglas Gregor replied to this thread saying that part of the proposal (superclass and protocol constraints) should be proposed and implemented for Swift 4, but that the remaining more generalised has little chance to make it in time for Swift 4.
In consequence, I started a new thread with the smaller feature of superclass and protocol constraints:
Quite a few comments have already been made about the proposal so I’ll post a new draft soon. But please let me know if you have more comments!
> On 31 Jan 2017, at 11:07, Chris Eidhof via swift-evolution <swift-evolution at swift.org> wrote:
> Hi swift-evolution,
> I was wondering if anything more detailed has been written about generalized existentials / type erasers. I noticed that AnyCollection only delegates a number of methods to its wrapped value, but often doesn't. For example, all the conditionally inherited items aren't being delegated (e.g. min()). This behavior was surprising to me (but makes sense once I thought about it longer).
> How would this work with generalized existentials? Are generalized existentials in scope at all for Swift 4?
> Chris Eidhof
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution