One of the most commonly requested features is the ability to parameterize protocols themselves. For example, a protocol that indicates that the Self
type can be constructed from some specified type T
or converted into T
:
// T -> Self:
protocol ConstructibleFrom<T> {
init(from value: T)
}