Email list hosting service & mailing list manager

empty intervals Alex Shinn (21 Apr 2022 11:02 UTC)
Re: empty intervals Bradley Lucier (21 Apr 2022 16:30 UTC)
Re: empty intervals Bradley Lucier (21 Apr 2022 16:37 UTC)
Re: empty intervals Per Bothner (21 Apr 2022 19:23 UTC)
Re: empty intervals Bradley Lucier (21 Apr 2022 21:59 UTC)
Re: empty intervals Per Bothner (21 Apr 2022 22:11 UTC)
Re: empty intervals Bradley Lucier (23 Apr 2022 17:56 UTC)
Re: empty intervals Per Bothner (23 Apr 2022 19:44 UTC)
Re: empty intervals Alex Shinn (24 Apr 2022 05:03 UTC)
Re: empty intervals John Cowan (21 Apr 2022 22:56 UTC)
Re: empty intervals Alex Shinn (22 Apr 2022 09:03 UTC)

Re: empty intervals Bradley Lucier 23 Apr 2022 17:56 UTC

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