[swift-evolution] Generic Subscripts

Douglas Gregor dgregor at apple.com
Tue Jan 10 13:40:12 CST 2017


> On Jan 10, 2017, at 10:34 AM, Michael Ilseman via swift-evolution <swift-evolution at swift.org> wrote:
> 
> [Forgot to CC swift-evolution the first time]
> 
> When this came up last, it was seen as more so a bug in the current implementation, rather than an explicit choice. There's no need for a proposal, just a JIRA: https://bugs.swift.org/browse/SR-115?jql=text%20~%20%22Generic%20subscript%22 <https://bugs.swift.org/browse/SR-115?jql=text%20~%20%22Generic%20subscript%22> 

It’s a nontrivial new user-facing feature with new syntax in the language, so it’ll need a proposal. ‘twould be good for the proposal to link to the JIRA ticket.

I’ve only heard positive reactions toward this feature, and it’s something that the standard library could make good use of.

	- Doug

> 
> 
>> On Jan 10, 2017, at 9:46 AM, Chris Eidhof via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Hi,
>> 
>> Recently, I've bumped into the lack of generic subscripts a few times. There are a bunch of useful things you could do with it. It's in the generics manifesto as well: https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-subscripts <https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-subscripts>
>> 
>> I'm thinking of drafting up a proposal for this (also thanks to https://twitter.com/dgregor79/status/818868882316214274 <https://twitter.com/dgregor79/status/818868882316214274>).
>> 
>> Are there any good arguments against adding this?
>> 
>> -- 
>> Chris Eidhof
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170110/1020b67d/attachment.html>


More information about the swift-evolution mailing list