2016-07-13 15:02 GMT+03:00 Adrian Zubarev via swift-evolution <
[email protected]>:
>
> To answer your question, we still need the metatype to access initializer
> and static member of that type. If we’d drop T.Type completely, we’d lose
> functionality to do so.
>
> protocol A {
> init()
> }
>
> func foo<T : A>(metatype: T.Type) -> T {
> return metatype.init()
> }
>
> In such cases, we can always refer to the type directly:
func foo<T : A>(metatype: Type<T>) -> T {
return T()
}
I would prefer to remove metatypes T.Type completely and replace them with
your somewhat transparent Type<T>.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution