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

Kevin Ballard kevin at sb.org
Sun Jan 3 01:48:25 CST 2016

On Sat, Jan 2, 2016, at 10:38 PM, Douglas Gregor wrote:
> * What is your evaluation of the proposal?


I have a preference for `associated` instead of `associatedtype`, but
it's not a big deal.

> * Is the problem being addressed significant enough to warrant a
> change to Swift?

Personally I don't think it's a particularly significant problem, but it
is a small one that this change would help with, and the change itself
is pretty minor (and can be automated in 100% of cases).

> * Does this proposal fit well with the feel and direction of Swift?


> * If you have you used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?

Rust has the same feature, although it uses the keyword `type` instead
of `typealias`. And they still use the same keyword `type` for
associated types inside of traits. But rust uses associated types much
more sparingly than Swift does (Rust traits can have generic type
parameters, and in fact associated types were a fairly late addition to
the language). Swift is also much more of a teaching language than Rust
is, so I think this change is quite reasonable for Swift.

> * How much effort did you put into your review? A glance, a quick
> reading, or an in-depth study?

I followed the original swift-evolution thread and read the proposal
again just now.

-Kevin Ballard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160102/08782b59/attachment.html>

More information about the swift-evolution mailing list