Re: [Scheme-reports] auxiliary syntax
Andy Wingo 07 Jan 2013 11:28 UTC
On Sun 06 Jan 2013 19:56, Peter Bex <Peter.Bex@xs4all.nl> writes:
> The second form in the following returns 1 in Chibi, Chicken, Gambit,
> MIT Scheme and Gauche:
>
> (define else #f)
> (cond (else 1))
Q: Why is this? A: Because all identifiers are present in the initial
environment in these implementations, so "define" is really "set!"
here. Therefore the "else" that is here is the same as the "else" that
the "cond".
> Racket, Guile and Scheme48 seem to agree that it's an unspecified value.
Q: Why? A: Because in these systems, the "define" is actually creating
a binding.
> the R7RS notion of providing default syntax forms for these keywords.
They don't have to be syntax. They just have to be defined. I believe
this does not affect Chicken-like systems that treat all identifiers as
defined.
Andy
--
http://wingolog.org/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports