[swift-evolution] [Review] Replace `typealias` keyword with `associatedtype` for associated type declarations

plx plxswift at icloud.com
Mon Jan 4 17:34:20 CST 2016


And of course it’s not like this is taking away functionality, just not adding it yet. So sure, +1, this is still forward progress. 

The fact it’s so easy to forget this other use of typealias doesn't really work in protocols right now is evidence enough for the proposal. Apologies for the double-about face.

> On Jan 4, 2016, at 6:17 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
> 
>> On a re-read I am -1; I like the `associatedtype` keyword but didn’t realize there was no plan to let `typealias` be used within a protocol to as a convenience (and to preserve intent, and to improve the development experience when still figuring out an interface design).
>> 
>> I would prefer the new keyword and also adding/allowing one to add convenience typealiases within a protocol definition.
> 
> I would love to see convenience typealiases supported in protocols eventually, but I actually think that should wait until after the transition to `associatedtype` is well behind us so we can get people used to the new keyword.
> 
> -- 
> Brent Royal-Gordon
> Architechies
> 



More information about the swift-evolution mailing list