[swift-evolution] [Pitch] Refactor Metatypes

Russ Bishop xenadu at gmail.com
Thu Oct 13 00:08:59 CDT 2016


> On Oct 11, 2016, at 12:26 AM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> This is the latest draft of the proposal: https://github.com/DevAndArtist/swift-evolution/blob/refactor_existential_metatypes/proposals/0126-refactor-metatypes.md <https://github.com/DevAndArtist/swift-evolution/blob/refactor_existential_metatypes/proposals/0126-refactor-metatypes.md>
> Refactor Metatypes
> 
> Proposal: SE–0126 <x-msg://5/0126-refactor-metatypes-repurpose-t-dot-self-and-mirror.md>
> Authors: Adrian Zubarev <https://github.com/DevAndArtist>, Anton Zhilin <https://github.com/Anton3>, Brent Royal-Gordon <https://github.com/brentdax>
> Status: Revision
> Review manager: Chris Lattner <http://github.com/lattner>
> Revision: 2
> Previous Revisions: 1 <https://github.com/apple/swift-evolution/blob/83707b0879c83dcde778f8163f5768212736fdc2/proposals/0126-refactor-metatypes-repurpose-t-dot-self-and-mirror.md>
> In this new notation, some of our existing standard library functions would have signatures like:
> 
> func unsafeBitCast<T, U>(_: T, to type: Type<U>) -> U
> func ==(t0: AnyType<Any>?, t1: AnyType<Any>?) -> Bool
> func type<T>(of instace: T) -> AnyType<T> // SE-0096
Are we not going to have func staticType<T>(of instance: T) -> Type<T> ?

(Also you mis-spelled “instace”)



Overall I like it and the whole scheme brings some nice clarity.


Russ



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161012/71271b1a/attachment.html>


More information about the swift-evolution mailing list