[swift-evolution] Proposal: Contiguous Variables (A.K.A. Fixed Sized Array Type)

Austin Zheng austinzheng at gmail.com
Fri Jan 29 12:30:59 CST 2016

That makes sense, thanks. I'm wondering if the N x T syntax might 'naturally fall out' of such a system for any other use cases.

Daydreaming aside, I think this is a great proposal and it'll make 256-member C array tuples less awful to work with.


> On Jan 29, 2016, at 10:29 AM, Joe Groff <jgroff at apple.com> wrote:
>> On Jan 29, 2016, at 10:22 AM, Austin Zheng via swift-evolution <swift-evolution at swift.org> wrote:
>> I like the (Count x Type) design, but if Swift got integer generic parameters in the future is this what tuple shorthand syntax would still look like (not rhetorical, actually asking)? It would be nice to future-proof whatever design we come up with, to a reasonable extent.
> You'd still need something to define FixedArray<N> in terms of:
> struct FixedArray<T,N: Int> { var values: (N x T) }
> -Joe

More information about the swift-evolution mailing list