On Mar 24, 2016, at 1:18 PM, Dave Abrahams via swift-evolution 
<[email protected]> wrote:
>> 
>> Is the problem being addressed significant enough to warrant a change
>> to Swift?
> 
> That's my biggest question about this proposal.  Yes, as the proposal
> says, generic type aliases fill an obvious functional gap.  But what
> real-world problems are they solving

They allow you to make aliases for generic types, e.g. from the document:

        typealias StringDictionary<T> = Dictionary<String, T>
        typealias DictionaryOfStrings<T : Hashable> = Dictionary<T, String>
        typealias IntFunction<T> = (T) -> Int
        typealias Vec3<T> = (T, T, T)
        typealias BackwardTriple<T1,T2,T3> = (T3, T2, T1)

It is an inconsistency in the language that you can create aliases for 
non-generic types, but that you can’t make them for generic ones.  Perhaps you 
are objecting to typealias as a feature at all?

> and why should adding them be a priority?

It is part of the general goal of completing the generics system, a stated 
Swift 3 goal.

-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to