Joe wrote: "What changes would be necessary to the standard library to make the most of this feature? Some particular problems we'd like to solve are to eliminate the need for the AnyGenerator/AnySequence/AnyCollection wrapper types, and to provide a solution for heterogeneous equality, so that protocols can inherit Equatable and Hashable without forfeiting the ability to be used dynamically. See Brent Simmons' Swift diary posts at inessential: Swift Diary for an example of why the latter is important."
Any advice for what could be done now in preparation for any changes that might happen and an estimate of when these types might be on the chopping block? Not 3.0, right? But 4.0? What are good ways to work around this now using current (and presumably stable) constructs?
I’ve had a few discussions about that with Joe and Rob Rix, where I understood less than I’d like to admit :) Joe recently said that the subject of type-erasure is probably not currently planned for Swift 3, but saying that:
On 14 Dec 2015, at 23:24, Erica Sadun via swift-evolution <swift-evolution@swift.org> wrote:
Joe wrote: "What changes would be necessary to the standard library to make the most of this feature? Some particular problems we'd like to solve are to eliminate the need for the AnyGenerator/AnySequence/AnyCollection wrapper types, and to provide a solution for heterogeneous equality, so that protocols can inherit Equatable and Hashable without forfeiting the ability to be used dynamically. See Brent Simmons' Swift diary posts at inessential: Swift Diary for an example of why the latter is important."
Any advice for what could be done now in preparation for any changes that might happen and an estimate of when these types might be on the chopping block? Not 3.0, right? But 4.0? What are good ways to work around this now using current (and presumably stable) constructs?
I *think* that Joe is talking about when two protocols require mention of
each other. This forms an odd cycle in the type system right now when you
try to use it.
On Mon, Dec 14, 2015 at 5:47 PM, David Hart via swift-evolution < swift-evolution@swift.org> wrote:
I’ve had a few discussions about that with Joe and Rob Rix, where I
understood less than I’d like to admit :) Joe recently said that the
subject of type-erasure is probably not currently planned for Swift 3, but
saying that:
On 14 Dec 2015, at 23:24, Erica Sadun via swift-evolution < > swift-evolution@swift.org> wrote:
Joe wrote: "What changes would be necessary to the standard library to
make the most of this feature? Some particular problems we'd like to solve
are to eliminate the need for the AnyGenerator/AnySequence/AnyCollection
wrapper types, and to provide a solution for heterogeneous equality, so
that protocols can inherit Equatable and Hashable without forfeiting the
ability to be used dynamically. See Brent Simmons' Swift diary posts at inessential: Swift Diary for an example of why the latter is
important."
Any advice for what could be done now in preparation for any changes that
might happen and an estimate of when these types might be on the chopping
block? Not 3.0, right? But 4.0? What are good ways to work around this now
using current (and presumably stable) constructs?