[swift-evolution] [Pitch] Remove type inference for associated types
dabrahams at apple.com
Wed Jun 29 01:50:15 CDT 2016
on Tue Jun 28 2016, Chris Lattner <swift-evolution at swift.org> wrote:
>> On Jun 28, 2016, at 11:25 AM, Douglas Gregor via swift-evolution
>> <swift-evolution at swift.org> wrote:
>>> Finally, I am very concerned that there are protocols such as Collection,
>>> with many inferrable associated types, and that conforming to these
>>> protocols could become *much* uglier.
>> That’s the general concern I have as well: how much boilerplate does
>> this add? In many cases, we get some of the associated type
>> witnesses for Collection types for free, and I don’t know to what
>> extent we can emulate that with defaulted associated type
>> requirements and typealiases in protocol extensions.
>> That said, I’ll take some minor regressions in this area for the
>> massive simplification that this proposal brings.
> Another point to add to Doug’s great summary: instead of keeping it,
> it is better in many ways to remove this feature in Swift 3, improve
> the generics model throughout Swift 4 cycle, and then consider adding
> inference back when we know more.
> The benefits of adding it back will be even more clear in the future,
> and the implementation cost will also be more knowable as the rest of
> the generics system is baked out.
I guess we're on the same page then:
More information about the swift-evolution