[swift-evolution] [Discussion] Seal `T.Type` into `Type<T>`
Brent Royal-Gordon
brent at architechies.com
Thu Jul 14 19:52:29 CDT 2016
> On Jul 14, 2016, at 5:24 PM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
>
> Ok, I forgot about it. Type<T> should have all features of T.Type, except that Type<T> will not contain static methods of T.
Why? It seems to me like the most natural way to design this by far is to have `Type<T>` be the type returned by `type(of:)`, which means it would have all static and class members on it. It also seems like `Type<T>`'s type would absolutely have to be `Type<Type<T>>`, and some form of infinite regress is absolutely necessary (though in practice it could probably be simulated by having the first metatype with no static members act as its own type, or with some other form of lazy instantiation).
You seem to have some very strong opinions about how this should work which run counter to the most straightforward designs, and I don't understand what their justifications are.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list