[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] 'else' auxiliary syntax



On Wed, Oct 15, 2014 at 11:35 PM, SAITO Atsushi <saito@x> wrote:
I think "else" is bound.

R5RS 3.1.
 > An identifier that names a type of syntax is called
 > a syntactic keyword and is said to be bound to that syntax.

R5RS 7.1.
 > <syntactic keyword> -> <_expression_ keyword>
 >  | else | => | define
 >  | unquote | unquote-splicing

"else" is syntactic keyword, and syntactic keyword is bound to syntax.

Yes, else is bound in R7RS, no one is arguing that.
However it was not bound in R5RS, and the question is what
should the (scheme r5rs) compatibility library do?

On Thu, Oct 16, 2014 at 8:06 AM, John Cowan <cowan@x> wrote:
Alex Shinn scripsit:

> I think the correct behavior for (scheme r5rs) is that these remain
> undefined, and cond, case and quasiquote all match the absence of the
> bindings as in R5RS.  This implies they are not just re-exported versions
> of the R7RS macros.

This seems more trouble than it's worth, particularly as R5RS is rather
vague on the treatment of auxiliary syntax keywords, and different R5RS
implementations do different things.

I'm happy to make slightly more trouble for R7RS implementors
if it can improve R5RS compatibility.

Takashi Kato scripsit:

> I believe R5RS library should export 'syntax-rules' since it's a bound symbol
> on R5RS but it's missing on R7RS small.

I agree that this is another auxiliary syntax keyword, and should be
treated like the rest.

R5RS was vague on this and we should have clarified but didn't.
syntax-rules could be interpreted as a keyword, but in practice,
in R6RS, and in upcoming extensions it's one of multiple bindings
to actual syntax which expands into a macro transformer.

Either way, this is another case of bound in R7RS but (arguably) not in R5RS,
and I think should be treated the same as else and =>.

In practice, I can't think of how specifying either way (bound or unbound)
would break existing R5RS programs, but I need to think a little more
about this.

-- 
Alex

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