[swift-evolution] [Pitch] Refactor Metatypes

Anton Zhilin antonyzhilin at gmail.com
Sat Feb 18 10:00:26 CST 2017


Type is a bad name for a public type: FooType is almost always a better
name. Libraries that describe “just types”, Swift types, can as well use
Metatype or Mirror or something.
For nested types, like Foo.Type, in the meaning of “type of Foo“, Type
can’t be used even now.
I’d give up on Type name for the greater future of metatypes.

2017-02-18 16:28 GMT+03:00 Adrian Zubarev <adrian.zubarev at devandartist.com>:

Personally I’d prefer Metatype<T> and AnyMetatype<T> to get rid of the
> restriction where you mostly cannot create custom types called Type,
> which annoys me a lot. Sometimes Kind as a good workaround but there are
> times where Kind doesn’t fit. :/
>
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170218/d77ae476/attachment.html>


More information about the swift-evolution mailing list