Email list hosting service & mailing list manager

fixed-array => special-array or specialized-array ??? Bradley Lucier (31 Aug 2015 20:48 UTC)
Re: fixed-array => special-array or specialized-array ??? Bradley Lucier (31 Aug 2015 21:51 UTC)
Re: fixed-array => special-array or specialized-array ??? Jamison Hope (01 Sep 2015 19:11 UTC)
Re: fixed-array => special-array or specialized-array ??? Bradley Lucier (02 Sep 2015 17:27 UTC)
Re: fixed-array => special-array or specialized-array ??? John Cowan (06 Sep 2015 18:42 UTC)
Re: fixed-array => special-array or specialized-array ??? Bradley Lucier (09 Sep 2015 18:27 UTC)

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          http://www.ccil.org/~cowan        xxxxxx@ccil.org
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