"So the getter of an Array with an empty interval as a domain would be able to return
no values at all. So I don't understand constructions that allow Arrays with empty
Intervals as domains to return a single value. Since I don't understand it, I don't allow it."
"Empty intervals" can refer to two different things. Consider: (l_0,...,l_d-1) and
(u_0,...,U_d-1). The number of elements in the array is:
(u_0 - l_u) ... * (u_d-1 - l_d_1). So if any u_i = l_i then the number of elements is 0.
This should be allowed. One may view a vector as a 1-dimensional array (and in fact
Kawa does that); clearly we allow 0-length vectors.
The confusing issue of "Arrays with empty Intervals as domains to return a single value"
refers to something slightly different: when the Interval-dimension (d - or 'rank' in APL-ese)
is zero. In that case note that the calculation of number of elements (above) returns 1 when d=0.
Supporting this case is less useful, but I think for consistent and generality we should do so.
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/