a simple counter-proposal
campbell@xxxxxx 28 Aug 2004 16:02 UTC
It occurred to me last night that a particularly simple extension to
SRFI 7 would likely appease all sides of this issue, including myself
and Felix. (Both a proponent of the existing SRFI 55 proposal and a
proponent of Scheme48's module system on IRC have already approved of
it.) SRFI 7's grammar would be extended in the <program> nonterminal:
<program> -->
(PROGRAM <program-clause>+) <command or definition>*
where <command or definition> is as defined by R5RS in section 7.1.6.
In the case that there are forms S* following the PROGRAM form that
contains clauses C*, it would be equivalent to having written a PROGRAM
form (program C* (code S*)). For example, Felix might write a program
with SRFI 55 to display the result of (iota 5):
(require-extension srfi-1)
(display (iota 5))
In SRFI 7, this would be written as:
(program (requires srfi-1)
(code (display (iota 5))))
Felix objects to this on grounds of complexity and extra typing. With
this new amendment proposal, the program written with SRFI 7* would be:
(program (requires srfi-1))
(display (iota 5))
which retains all existing functionality of SRFI 7 -- the feature
conditionalization -- and all brevity of SRFI 55's REQUIRE-EXTENSION --
it's only a single character longer, in fact --; furthermore, it is
still compatible with module systems such as that of Scheme48, because
the module data -- the configuration language -- is _still_ entirely
disjoint from Scheme, unlike the present SRFI 55's REQUIRE-EXTENSION;
the configuration language is very clearly separated from Scheme in
that the PROGRAM form is the first in the file, and every following S-
expression is Scheme. I propose that SRFI 55 be revised to define this
amendment/extension to SRFI 7, which I expect will satisfy the demands
in brevity of Felix as well as retain the functionality of SRFIs 0 & 7,
and moreover still be as extremely portable as SRFI 7. (While they're
at it, the SRFI 55 authors could also include a statement about trying
to make features available if they're not already available, if they
still consider the absence of such a statement in SRFI 7 an important
issue.)
Comments?