19141, "stonea", "Should Array.idxType return a tuple for multi-dimensional arrays?", "2022-01-28T22:33:39Z"
This was brought up during the Array Module re-review (https://github.com/Cray/chapel-private/issues/2955).
Right now if you have (say) a 3D array of ints and query array.idxType you'll just get back int
but amybe it would be better if returned a tuple like: 3*int
?
This would allow doing things like the following:
var i : A.idxType;
i = A.domain.first;
Some other thoguhts\questions:
- In the 1D case should this function return the value or a 1-tuple of the value?
- If we go down this route should we also have a function that returns the base type?A
- Maybe we'd want the same behavior on
intIdxType
(although maybe we'll get rid of that method altogether?)