[r6rs-discuss] [Formal] syntactic sugar causes cancer of the exports

From: AndrevanTonder <andre>
Date: Fri, 15 Jun 2007 18:44:24 -0400 (EDT)

William Clinger wrote:

> The file-options syntax is the only one of the four that
> has anything to do with enumeration sets.

I was under the impression (perhaps incorrect) based on prior discussion on
this list that, even if some care has been taken to formulate these
syntaxes independently of (rnrs enum), the intent was to make them compatible
with using (rnrs enum) to implement them.

> The problem arises because identifiers must be exported
> in order for the endianness, file-options, eol-style,
> and error-handling-mode syntaxes to recognize their
> arguments.

All these cases could conceivably be implemented in terms of (rnrs enum),
using one of the following two syntaxes provided there:

   (<type-name> <symbol>) checks at macro-expansion time whether <symbol> is in
   the universe associated with <type-name>. If it is, (<type-name> <symbol>) is
   equivalent to <symbol>. It is a syntax violation if it is not.

   (<constructor-syntax> <symbol> ...) checks at macro-expansion time whether
   every <symbol> ... is in the universe associated with <type-name>. It is a
   syntax violation if one or more is not.

In both cases, (rnrs enum) refers to <symbol>s, not identifiers, which would
eliminate the cancer of the exports. The discussion in the other libraries are,
as you note, inconsistent with this. It can easily be made consistent, and
perhaps should be.

Andre
Received on Fri Jun 15 2007 - 18:44:24 UTC

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