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?
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!
David.
···
On 31 Jan 2017, at 11:07, Chris Eidhof via swift-evolution <swift-evolution@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?