On 4/21/22 6:11 PM, Per Bothner wrote:
>
>
> On 4/21/22 14:59, Bradley Lucier wrote:
>> And now, if functionally an array with at least one axis of length
>> zero has
>>
>> (array-ref a i j k l)
>>
>> raise an error no matter the number or values of the arguments, is
>> there a difference between empty arrays of different dimensions?
>
> Not really. When you catch and print out data (if any) associated with
> the error
> ideally it should tell you the invalid indexes along with the array
> bounds, but that's
> just to help debugging.
The sample implementation of specialized arrays by default does no
checking of indices and assumes that every multi-index passed to a
getter or setter is valid.
Up till now trying to make an empty interval raised an exception, as it
seemed that, in general, making an array with no elements wasn't very
useful. So at least some indices into the array are valid.
Do you expect that accessing or storing something into an array with
empty domain will always throw an exception?
Brad