From a quick look, the previous threads’ tuple-array quasi-equivalence would work for one-dimensional arrays, but I want to go beyond what C has and do multi-dimensional arrays too (co-equal coordinates, not just C’s nested arrays). Of course a non-linear structure brings questions on how to visit/traverse every element; the existing sequence and collection protocols assume linearity, as well as the “for” statements that use said conforming types.
···
On Jun 26, 2016, at 2:20 AM, Félix Cloutier <felixcca@yahoo.ca> wrote:
There have been proposals about that, revolving around creating a new tuple syntax for fixed-size arrays, like (Int x 5), and adding a subscript to them. IIRC, the sentiment was largely positive but people couldn't agree on the specific syntax.
I pushed a little bit for CollectionType on these, regardless of the type syntax (could have been (Int, Int, Int, Int, Int) for all I was concerned), but there were apparently important implementation challenges stemming from tuples being non-nominal types.
[swift-evolution] CollectionType on uniform tuples [forked off Contiguous Variables]
I would like to revive this discussion, but I'm afraid that we're getting late for the Swift 3 release.
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com