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

Re: SRFI-10 syntax vs. #nA syntax



Per Bothner wrote:
> In Scheme ... arrays are [generally] mutable.  A Scheme array contains
> a number of "locations" (or "cells" or "places"), where the number is
> equal to the product of the dimensions.  Each location contains a
> value; if the array is mutable (the normal case) then the contained
> value may be changed using array-set!  Hence we must distinguish
> between the location and the value stored in it.  A rank-0 array
> contains 1 location, which for consistency must also be mutable
> (except for literal arrays).   Hence, a rank-0 array is not equivalent
> to the value stored in its location.

OK, that makes sense (assuming that the product of no values is 1, which
I suppose is reasonable). Note, however, that the SRFI 47 constructors
do not permit the creation of rank-0 arrays, and it even uses rank 0 to
indicate that an object isn't an array at all, so I don't mind if you
can't create them with the literal syntax either.
-- 
Bradd W. Szonye
http://www.szonye.com/bradd