[swift-evolution] CollectionType on uniform tuples [forked off Contiguous Variables]

Chris Lattner clattner at apple.com
Thu Feb 11 14:38:07 CST 2016


> On Feb 11, 2016, at 10:59 AM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> 
>> On Feb 11, 2016, at 9:12 AM, FĂ©lix Cloutier via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Hi all,
>> 
>> Since the original fixed-size array thread is somewhat stalling, I forked off the subscript part into this: Treat uniform tuples as collections <https://github.com/zneak/swift-evolution/blob/uniform-tuples/proposals/00nn-collectiontype-for-tuples.md>
> This specific proposal is a non-starter for me, because it lands squarely in the "death valley" of being extremely invasive on the implementation while providing only a small amount of relative value.

I agree with Doug on this.  I still think the right approach is to:

1) add a subscript on tuples with a consistent element kind.
2) add some type sugar for defining these types
3) consider a convenient form for defining an initializer on these.

To me, that is the order of priority.  Just getting #1 and #2 would seriously move the needle on making C arrays work better, with very little implementation complexity.  #3 would be nice, but seems less important.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160211/67d94d3e/attachment.html>


More information about the swift-evolution mailing list