It would be rather useful if [] and []= could be overloaded suitably for at least two-dimensional arrays. We already have i..j having the distinct meaning of slicing, so it's a matter of picking a nice looking operator. (If () was overloadable, then we could implement Fortran-style array indexing)
The rationale is that a[i][j] is suboptimal for two reasons - extra indirection, and loss of locality.
Nimrod arrays are value types, not reference types, so there's no extra indirection or loss of locality for array[1..n,array[1..m,T]] and similar types.
If you want a reference, you'll have to use ref array[1..n,array[1..m,T]] (which also does not require an extra indirection, though ref array[1..n, ref array[1..m,T]] would. Note that there's a bug that can prevent ref array types from being used with reference counting. You'll have to use a different gc (e.g., --gc:markAndSweep) instead.
You can overload a[i,j] for user-defined types; however, this does not (currently) appear to be possible for types that already have an indexing operator.
Both problems can be worked around by wrapping multi-dimensional arrays in a class, e.g.:
type
squareMatrix[R,T] =
object
data: array[R,array[R,T]]
squareMatrixRef[R,T] =
ref squareMatrix[R,T]