Re: Improper lists in macros [WAS: none] felix (13 Feb 2002 23:35 UTC)
Re: Improper lists in macros [WAS: none] sperber@xxxxxx (14 Feb 2002 08:32 UTC)
Re: Improper lists in macros [WAS: none] oleg@xxxxxx (28 Feb 2002 03:50 UTC)

Re: Improper lists in macros [WAS: none] oleg@xxxxxx 28 Feb 2002 03:53 UTC

Regarding if (foo 1 . (2)) is a valid expression

I'm sorry that this remark has nothing to do with SRFI-26 per se. I'd
only like to point out that this topic has been discussed before, in
some interesting detail.

One thread:
http://groups.google.com/groups?hl=en&frame=right&th=b91405fdd9d49df7&seekm=8vca7q%2422g%241%40news3.bu.edu#link8

specifically:
http://groups.google.com/groups?hl=en&frame=right&th=b91405fdd9d49df7&seekm=zoikf3u6.fsf%40content-integrity.com#link26

And another thread:

http://groups.google.com/groups?hl=en&threadm=k8a3spk3.fsf%40content-integrity.com

It seems Joe Marshall shared Mike's position: the spirit of
R5RS ought to allow expressions like "(foo 1 . (2))". However, Joe Marshall
conceded that a compliant implementation has every right to refuse to
accept (foo 1 . (2)), however foo is bound (to a procedure or to
a syntax transformer). Therefore, when Gambit says

> (+ 1 . (2))
*** ERROR IN (stdin)@1.1 -- Ill-formed procedure call
> (define-macro (foo . x) #f)
> (foo 1 . (2))
*** ERROR IN (stdin)@4.1 -- Ill-formed special form: foo

it is being compliant. BTW, the following does work:

> (define-macro (bar . x) `',x)
> (bar 1 2)
(1 2)
> (bar (1 . 2))
((1 . 2))
> (bar (1 . (2)))
((1 2))