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

James Hillhouse IV jimhillhouse at me.com
Mon Feb 1 10:57:38 CST 2016


> On a related note, I’d really love to have a way to declare multi-dimensional arrays and be able to name the axes. 

I would like to strongly second John Randolph’s request for a multi-dimensional arrays, otherwise known as matrices. There is currently GLKMatrix3 and GLKMatrix4, which hold CGFloats. But it would be more useful to for matrix members to be Float, Double, Int, String, etc..

var aMatrix: Matrix<Int> = Matrix(row: 6, columns: 20)

I would also like to request quaternions and tensors in Swift. Currently quaternions can be had via GLKQuaternion, but it holds only CGFloat variables. There are times I would like to instead use Double. 

Tensors are not currently in Swift.

Thanks,

Jim Hillhouse


More information about the swift-evolution mailing list