[swift-evolution] [RFC] Associated type inference

Greg Titus greg at omnigroup.com
Fri Dec 1 12:07:44 CST 2017



> On Dec 1, 2017, at 9:11 AM, Ben Langmuir via swift-evolution <swift-evolution at swift.org> wrote:
> Hey Doug,
> 
> I'm very much in favour of reducing the scope of associated type inference.  Can you outline why you believe that (3) is necessary?  If I am following correctly, if we had (1) and (2) the only thing you'd need to add to the "minimal collection" implementation would be a typealias for `Element`, which seems reasonable to me.
> 
> Ben

If nothing else, dropping (3) would be source breaking for 90%+ of current associated type uses. Whereas even the very minimal inference in (3) probably brings that figure down to 1% or so (outside of the stdlib, which would need to adopt a bunch of (2)). Obviously these percentages are just my guesses and not based on any real survey, but certainly would be the case for all Swift code I’ve seen.

	- Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171201/8ef466df/attachment.html>


More information about the swift-evolution mailing list