[swift-evolution] [Pitch] Remove type inference for associated types

David Sweeris davesweeris at mac.com
Thu Jun 30 10:41:08 CDT 2016


No, but I don't think I'd be opposed to this:
struct MyCollection {
    associatedtype Index = struct _ : Comparable { … } // struct's name is implicitly also "Index"
}

- Dave Sweeris

On Jun 30, 2016, at 07:53, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:

>    struct MyCollection {
>        struct Index: Comparable { … }
>    }
> 
> Should you replace `struct` with `associatedtype`? No? Then why would you replace `typealias` with `associatedtype`?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160630/c6ea3da1/attachment.html>


More information about the swift-evolution mailing list