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

Pyry Jahkola pyry.jahkola at iki.fi
Sat Jun 25 04:20:29 CDT 2016


Hi Austin,

I also think it's better to make associated types explicit in protocol conformance. But I'm not sure the requirement to use the `associatedtype` keyword on the conformance site is the right way to do so, especially since you haven't addressed how nested types could fulfill associated type requirements in the new design:

    extension Foo : P {
        struct A { ... }
    }

— Pyry

> Austin Zheng wrote:
> 
> Hello all,
> 
> Per Chris Lattner's list of open Swift 3 design topics (http://article.gmane.org/gmane.comp.lang.swift.evolution/21369), I've put together a proposal for removing type inference for associated types.
> 
> It can be found here: https://github.com/austinzheng/swift-evolution/blob/az-assoctypeinf/proposals/XXXX-remove-assoctype-inference.md
> 
> Thoughts, criticism, and feedback welcome. There are at least two slightly different designs in the proposal, and I'm sure people will have ideas for even more.
> 
> Best,
> Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160625/ec7914db/attachment.html>


More information about the swift-evolution mailing list