[r6rs-discuss] Why can ... and _ not be literals?

From: David Van Horn <dvanhorn>
Date: Sun, 24 Jun 2007 20:23:40 -0400 (EDT)

On Sun, 24 Jun 2007, AndrevanTonder wrote:
> I noticed the following in the descriptionm of SYNTAX-RULES in section 9.20:
>
> "It is a syntax violation if an ellipsis or underscore appears in (<literal>
> ...)."
>
> I do not understand the justification for this. It is incompatible with r5rs
> (I think, and so did at least some implementors of r5rs systems), so legacy
> macros will stop working.

It is compatible in the case of ellipsis; R5RS (4.3.2) states "It is an
error for ... to appear in <literals>." As far as I can tell, underscore
is not distinguished in any way (so this is an incompatible change and
legacy code will break in this case).

Note that treating underscore as a non-pattern variable (as done in the
current draft) also breaks legacy code since it changes the meaning of
underscore occurrences in templates.

I agree that ellipsis and underscore should be allowed in literals. I'm
on the fence with the (incompatilbe) change to underscore to no longer be
considered a pattern variable.

David
Received on Sun Jun 24 2007 - 20:23:40 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC