[swift-evolution] Generic Subscripts

Chris Eidhof chris at eidhof.nl
Sun Jan 15 03:32:43 CST 2017


I agree with Dave. To me, building in a limit so that the return type can't
be inferred seems arbitrary.

On Sun, Jan 15, 2017 at 12:41 AM, Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:

>
> on Fri Jan 13 2017, John McCall <swift-evolution at swift.org> wrote:
>
> > I'm also not sure we'd ever want the element type to be inferred from
> > context like this.  Generic subscripts as I see it are about being
> > generic over *indexes*, not somehow about presenting a polymorphic
> > value.
>
> Actually I *would* want to be able to do that, though I admit it's the
> 1% case (or less).
>
> --
> -Dave
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>



-- 
Chris Eidhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170115/0c62f189/attachment.html>


More information about the swift-evolution mailing list