[R6RS] Modules
dyb at cs.indiana.edu
dyb
Thu Nov 11 16:03:58 EST 2004
> Kent> ... but I don't know how this argues against abstraction. You are
> Kent> again implying that abstraction could somehow make the situation worse,
> Kent> but a well-designed abstraction would not do so. In particular, an
> Kent> abstraction may make the set of identifiers being imported more rather
> Kent> than less clear, i.e., more rather than less "hygienic".
>
> I just haven't seen any evidence of this---examples might help.
Here's a simple one from our module paper (with require for import):
(define-syntax from
(syntax-rules ()
((_ M id) (let () (require M) id))))
(from M x)
Using local (or just nested top-level) modules we can also implement
things like selection and renaming of imports, e.g.:
(require* (only M x y z)) ->
(begin
(module t (x y z) (require M))
(require t))
> ... Macro-expanding into a definition may
> obscure the identifier locally, ...
This is only a concern if one accepts the premise that syntactic
abstraction is more likely to obscure than elucidate intent. If syntactic
abstraction is bad here, then it must be bad elsewhere, and we should
do away with it.
Kent
More information about the R6RS
mailing list