[swift-evolution] [Pitch] Refactor Metatypes

Adrian Zubarev adrian.zubarev at devandartist.com
Sat Feb 18 07:28:38 CST 2017


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. :/



-- 
Adrian Zubarev
Sent with Airmail

Am 18. Februar 2017 um 10:20:14, Anton Zhilin (antonyzhilin at gmail.com) schrieb:

Yes,  
Any,  
AnyObject,  
AnyType would look nice together. But I’d suggest to do it separately and for now, try to push the main proposal for review.

2017-02-17 19:09 GMT+03:00 Adrian Zubarev <adrian.zubarev at devandartist.com>:

Personally I’d like a shortcut like AnyType, but it won’t work as a typealias, because it will create a circle reference between AnyType and AnyType<T>.

However, there is a small possibility that this type might be generalized like Any (now possibly AnyObject) directly into the language. That would probably allow us to use AnyType as a shortcut to AnyType<Any>.

I’m not sure if this should be part of our proposal or not. I’d like to have some more feedback from the core team on this one.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170218/7a63913e/attachment.html>


More information about the swift-evolution mailing list