[Accepted] SE-0048: Generic Type Aliases


(Douglas Gregor) #1

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md

The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.

  - Doug


(Nicola Salmoria) #2

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md

The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.

- Doug

Is this actually implemented fully?

The constraints on the typealias type don’t seem to work in the latest development snapshot (2016-04-12a):

typealias StringDict<T> = Dictionary<T, String> // error: type 'T' does not conform to protocol 'Hashable'
typealias StringDict<T: Hashable> = Dictionary<T, String> // error: type parameters may not be constrained in typealias argument list

···


Nicola


(James Richard) #3

I believe he means it has been merged to master, and will be in the next snapshot.

···

Sent from my iPad

On Apr 16, 2016, at 1:12 AM, Nicola Salmoria via swift-evolution <swift-evolution@swift.org> wrote:

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md

The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.

- Doug

Is this actually implemented fully?

The constraints on the typealias type don’t seem to work in the latest development snapshot (2016-04-12a):

typealias StringDict<T> = Dictionary<T, String> // error: type 'T' does not conform to protocol 'Hashable'
typealias StringDict<T: Hashable> = Dictionary<T, String> // error: type parameters may not be constrained in typealias argument list


Nicola

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Chris Lattner) #4

No, I’m still working on it.

-Chris

···

On Apr 16, 2016, at 1:12 AM, Nicola Salmoria via swift-evolution <swift-evolution@swift.org> wrote:

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md

The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.

- Doug

Is this actually implemented fully?


(Douglas Gregor) #5

I’d forgotten that the implementation was still incomplete.

  - Doug

···

On Apr 16, 2016, at 4:12 PM, Chris Lattner <clattner@apple.com> wrote:

On Apr 16, 2016, at 1:12 AM, Nicola Salmoria via swift-evolution <swift-evolution@swift.org> wrote:

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md

The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.

- Doug

Is this actually implemented fully?

No, I’m still working on it.