[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] Description of self-evaluation is a bit too terse
- To: Scheme Reports <scheme-reports@x>
- Subject: [Scheme-reports] Description of self-evaluation is a bit too terse
- From: Peter Bex <Peter.Bex@x>
- Date: Sun, 26 May 2013 14:47:59 +0200
- Mail-followup-to: Scheme Reports <scheme-reports@x>
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).
Scheme-reports mailing list