From: John Cowan <[email protected]>
Subject: [r6rs-discuss] Proposed features for small Scheme, part 9: modules
Date: Mon, 12 Oct 2009 00:23:33 -0400

> Module names, like feature groups, are recognized by cond-expand (from
> SRFI 0), which makes it possible to conditionally control the actions
> of a program depending on what modules have been imported into it.

Will we allow cond-expand to expand into another 'import' form
or not?

If we keep cond-expand as macro-time construct and module form
as meta construct (that is, something that can be recognized before
macro expansion, as in R6RS), then the answer is NO.  It can be
that way, but it somewhat reduces the usability of cond-expand,
since you cannot write something like "if the feature A is not
available, but if module B is avaiable, then provide an
alternative implementation of A using B"---unless you explicitly
imports module B beforehand, but that excludes the platform that
does have feature A but not module B.

If we want to import modules conditionally, we should either
(1) make import form recognized after macro expansion, or
(2) lift cond-expand to the module-level syntax.  There are
implementations that does (1)---e.g. Gauche does so.  The
drawback is that any meta program that wants to process
module dependencies needs to do macro expansion.
Choice (2) is technically possible, but I'm afraid that it
makes module syntax spec bloated.

Currently I'm not sure which of these three choices (including
the zero-th choice).   What other people do think?

--shiro

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to