[Scheme-reports] Description of self-evaluation is a bit too terse Peter Bex (26 May 2013 12:48 UTC)

[Scheme-reports] Description of self-evaluation is a bit too terse Peter Bex 26 May 2013 12:47 UTC

Hi all,

I'm working on the R7 support for CHICKEN again, and it wasn't immediately
clear whether (let ((a 3) (b 4)) #(1 2 a b)) should evaluate to
'#(1 2 a b) or `#(1 2 ,a ,b).  I checked with Chibi and was initially
surprised that it's '#(1 2 a b).  After some thought, this makes sense
because it's a literal constant, and those are allowed to share storage
and not freshly allocated every time.

However, the draft barely mentions what "self-evaluating" even means.
I think this could be improved.  Perhaps something like the following
could be added to 6.8:

"Self-evaluating means it is implicitly quoted.  Symbols occuring inside
 a vector literal will be read literally, not resolved as identifiers."

An example containing symbols would be good too.

I think the same confusion is also possible for bytevectors (section 6.9).
(let ((a 3)) #u8(1 2 a)) is an error, not equivalent to #u8(1 2 3).

Cheers,
Peter
--
http://www.more-magic.net

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports