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

Joe Groff jgroff at apple.com
Fri Jan 29 12:29:00 CST 2016


> 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