This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Splicing lists and vectors into argument lists


On 05/10/2014 11:49 AM, Helmut Eller wrote:
On Sat, May 10 2014, Per Bothner wrote:

A issue is that initial '@' in a symbol is *not* allowed by R7RS or
R6RS. ('@' is a <special subsequent> so is not allowed as an initial
character.)

Oh boy.  They let you put Unicode chars there but no @.  Oh wait, they
actually say "it is an error for the first character to have a general
category of Nd, Mc, or Me."  But @ belongs to category Po.  And again
they use the meaningless phrase "it is an error" which of course only
means that it may or may not be allowed by an implementation.

I just noticed the r7rs errata:
http://trac.sacrideo.us/wg/wiki/R7RSSmallErrata

    7, In Section 7.1.1, the lexical rule <special initial> incorrectly omits @.

Since (in my reading) r6rs also allows an initial '@', I think it would be
correct for the --r7rs/--r6rs/--r5rs flags to disable the '@' reader
mapping from @EXPR to ($splice$ EXPR).  (r5rs doesn't allow an initial '@',
but allowing it would still be a compatible extension, so for simplify
--r5rs behaves the same.)

So I checked in a fix for this:

$ kawa --r7rs
#|kawa:1|# (define @ 3)
#|kawa:2|# (define @2 2)
#|kawa:3|# (+ @ @2)
5
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]