[swift-evolution] [Pitch] Strong typedef, version 0.2

Daryle Walker darylew at mac.com
Wed Jul 12 10:36:48 CDT 2017

I’ve updated my strong type-alias proposal at <https://gist.github.com/CTMacUser/c493f775075e946efdcfd85d38473291>. There’s 3 revisions instead of 2 because I missed a big error.

* I removed all the state-restriction stuff (but still noted as a possible future direction). Besides removing a lot of text, it also means that a strong alias of an enumeration must publish all the cases.
* Rearranged some text, screwing up the diff some more.
* Added the concept of an implementation initializer, as the default way to convert from the original type to the alternative.
* Casts between alternative types and/or their original type all use unconditional-as.
* Added “AlternativeStats” generic type to contain type-aliases to the original type and conversion functions without having to name that original type.

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170712/459cb9f1/attachment.html>

More information about the swift-evolution mailing list