FWIW they're marked as 'unlikely' here: https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-protocols
It would probably be useful to have counterarguments against the points raised in that document if you want to prepare a proposal. Austin On Wed, Jun 8, 2016 at 2:32 PM, Jordan Rose via swift-evolution < [email protected]> wrote: > Associated types aren't generic parameters; the whole point is that > they're requirements, just like the other declarations in a protocol. > > You might be trying to invent generic protocols instead, which (IIRC) > aren't inherently a bad thing. But I think this needs a lot more fleshing > out before it can really be discussed—it's hard to know how you can and > can't use these things, and how they might be implemented. > > Best, > Jordan > > > > On Jun 8, 2016, at 12:07, Антон Жилин via swift-evolution < > [email protected]> wrote: > > > > ==Motivation== > > > > protocol From { > > associatedtype FromType > > init(_ value: FromType) > > } > > > > The problem is, one type cannot implement multiple From "conversions". > > > > ==Proposed solution== > > > > Allow specifying all associated types using generic syntax. > > > > extension Int : From<Float> { } > > extension Int : From<Double> { } > > > > This is only allowed in conformance declarations. > > > > ==Future directions== > > > > We can replace all *Convertible protocols with From and Into, which will > be defined similarly to Rust. > > > > - Anton > > _______________________________________________ > > swift-evolution mailing list > > [email protected] > > https://lists.swift.org/mailman/listinfo/swift-evolution > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
