self evaluation, immutability Shiro Kawai (02 Jan 2005 05:14 UTC)
Re: self evaluation, immutability Aubrey Jaffer (02 Jan 2005 05:46 UTC)

Re: self evaluation, immutability Aubrey Jaffer 02 Jan 2005 05:46 UTC

 | Date: Sat, 01 Jan 2005 19:14:15 -1000 (HST)
 | From: Shiro Kawai <xxxxxx@lava.net>
 |
 | srfi-58-new.html has an example:
 |
 |   (array-dimensions #2A:integer+16((0 1 2) (3 5 4))) ==> (2 3)
 |
 | Do you suggest arrays are self-evaluating objects, or a quote is
 | simply missing before the array literal?

The quote was missing.  I have expanded that section to:

  A two-by-three array of nonnegative 16.bit integers is written:

  #2A:integer+16((0 1 2) (3 5 4))

  Note that this is the external representation of an array, not an
  expression evaluating to a array.  Like vector constants, array
  constants must be quoted:

  '#2a:INTEGER+16((0 1 2) (3 5 4))
		 ==> #2A:integer+16((0 1 2) (3 5 4))

 | I also assume literal arrays are immutable, like literal strings
 | and vectors, right?  Although the immutability is implied from
 | R5RS section 3.4, it may be nice to have it explicit in srfi-58,
 | since I see modifying literal values is a common type of errors.

Thanks for your suggestions.  I have added the paragraph:

  Literal array constants are immutable objects.  It is an error to
  attempt to store a new value into a location that is denoted by an
  immutable object.