Re: fixed-array => special-array or specialized-array ??? John Cowan 06 Sep 2015 18:42 UTC

Bradley Lucier scripsit:

> array-{curry,distinguish-one-axis} returns an array of arrays, can
> be applied to any type of array.
> mutable-array-{curry,distinguish-one-axis} returns an array of
> mutable-arrays, can be applied only to mutable-arrays (which
> includes fixed-arrays with the current SRFI text).
> fixed-array-{curry,distinguish-one-axis} returns an array of
> fixed-arrays, can be applied only to fixed-arrays.

All that is true, but we haven't found it necessary to rename set-car! and
set-cdr! to set-mutable-car! and set-mutable-cdr!.  They just succeed on
mutable pairs and fail on constant pairs (generated from quoted lists,
generally).  Nor are there separate APIs in R6RS for mutable and immutable
hash tables.

Just lay down the principle that arrays, fixed or not, can be mutable
or immutable, and that it is an error to attempt to mutate the immutable
(insert joke about "eff the ineffable" here).  The obvious way to create
a mutable general array is with an optional setter argument (if present,
it's mutable); some other device would be needed for mutable vs. immutable
simple arrays.

Thanks for pushing out the new draft, BTW.  I'm going to be reviewing
it de novo soon.

John Cowan
While staying with the Asonu, I met a man from the Candensian plane,
which is very much like ours, only more of it consists of Toronto.
        --Ursula K. Le Guin, Changing Planes