Comment 6 for bug 260143

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 260143] Re: free-identifier=? bug or by design?

On Aug 22, 2008, at 8:55 AM, leppie wrote:

> This leads me to believe one should 'never' use auxiliary keywords.

They are a little confusing and inconvenient, I agree.

> For
> example, in my case, a single macro might have several (about 10)
> auxiliary keywords (some of whom are 'let' and '='). The way I see
> it, I
> have 2 options:

> 1. Leave as is, and pray no one redefines an auxiliary keyword

This has been the case in R5RS where if you define else, cond and
case stop working properly. In R6RS (libraries, not top-level),
you cannot accidentally break cond by redefining else since else
is imported from (rnrs) along with cond.

> (does the original described behaviour only occur when redefined
> after a library has been imported?).

Nop. Order does not matter.

> 2. Export all auxiliary keywords, but then I have the problem that
> it will clash with existing keywords, eg 'let' & '=', when imported.

They won't clash if you re-export the 'let' and '=' from (rnrs).
Your library should import and re-export these, rather than define
them as auxiliary keywords.

> Ideally I would like it to be like (1), but without the ability to
> redefine the keywords. Maybe there is a way to achieve this, by
> creating
> the keywords via datum->syntax?

Nop. Don't try.