[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New function array-mutable?

From: lloda
Subject: Re: [PATCH] New function array-mutable?
Date: Thu, 25 Nov 2021 19:56:49 +0100

> On 25 Nov 2021, at 19:22, Maxime Devos <> wrote:
> lloda schreef op do 25-11-2021 om 17:40 [+0100]:
>> +Arrays with empty roots are not considered immutable because
>> +@code{array-set!} operations with valid indices won't fail (since
>> there
>> +are no valid indices).
>> +
>> +@example
>> +(array-mutable? #()) @result{} #t
>> +@end example
>> +@end deffn
> By this logic, shouldn't empty subarrays (*) with a possibly mutable
> and non-empty root be considered mutable as well?
> (*) called ‘shared arrays’ in the manual
> Greetings,
> Maxime

That would make sense, I think.

The test in the patch is the same one that is used to validate 
array_handle_xxx_writable_elements(), which looks only at the root and not at 
the array dimensions. Those two tests should be the same, so I'll have to 
change the test in array_handle_xxx_writable_elements().



reply via email to

[Prev in Thread] Current Thread [Next in Thread]