Note on array-copy Jens Axel Søgaard (05 Jan 2022 21:02 UTC)
Re: Note on array-copy Bradley Lucier (05 Jan 2022 22:34 UTC)
Re: Note on array-copy Jens Axel Søgaard (05 Jan 2022 23:08 UTC)
Re: Note on array-copy Bradley Lucier (05 Jan 2022 23:33 UTC)
Re: Note on array-copy Bradley Lucier (05 Jan 2022 23:42 UTC)
Re: Note on array-copy Bradley Lucier (05 Jan 2022 23:55 UTC)
Re: Note on array-copy John Cowan (06 Jan 2022 00:50 UTC)
Re: Note on array-copy Jens Axel Søgaard (07 Jan 2022 14:54 UTC)

Re: Note on array-copy Bradley Lucier 05 Jan 2022 22:34 UTC

On 1/5/22 4:02 PM, Jens Axel Søgaard wrote:
> Hi All,
>
> The description on array-copy is:
>
>     The specialized array returned by array-copy can be defined
>     conceptually by:
>
>
>     (list->array (array->list array)
>                   new-domain
>                   result-storage-class
>                   mutable?
>                   safe?)
>
>
> The text doesn't say much about safe?, but the reference implementation
> does the following:
>
>    If array is a specialized array, then the copy gets the same setting
> as array.
>    If array  is a generalized array, then the value used is taken from the
>     parameter specialized-array-default-safe?.
>
> This behavior makes sense to me.
>
> /Jens Axel
>

Hi Jens Axel:

The reference implementation of SRFI 179 here:

https://github.com/scheme-requests-for-implementation/srfi-179/blob/master/generic-arrays.scm

gets the default mutable? and safe? from
specialized-array-default-mutable? and specialized-array-default-safe?
no matter the type of the first argument.

My draft followup to SRFI 179 found here:

https://github.com/gambiteer/srfi-179-followup/tree/original

does behave as you say, and I believe it's documented there.

I plan to ask Arthur to start the formal process for an updated array
SRFI incorporating changes suggested in the mail list after SRFI 179 was
finalized.

Brad

(I forgot to send to the mail list the first time.)