>>836
THX!

Generic protocols

One of the most commonly requested features is the ability to parameterize protocols themselves.
これこれ!俺もコレが欲しかった!
protocol ConstructibleFromValue<T> {
init(_ value: T)
}
こうすると、構造体Realに対して2種類のinitの実装を求める事ができる。
これの何が問題なんだ?
struct Real { ... }
extension Real : ConstructibleFrom<Float> {
init(_ value: Float) { ... }
}
extension Real : ConstructibleFrom<Double> {
init(_ value: Double) { ... }
}