On Mon, May 4, 2009 at 11:38 AM, Michele Simionato
<[email protected]> wrote:
> On Mon, May 4, 2009 at 11:27 AM, Michele Simionato
> <[email protected]> wrote:
>> If it cannot be done portably, I see little point in doing so
>> too.
>
> Perhaps it can be done portably. I have some little idea, but I will
> have to try it tomorrow.

I tried my idea at the lunch break and I think it works portably
(tested on Ikarus and Ypsilon, at work I do not
have that many Scheme implementations installed) but I am not
completely happy with that.
It is enough to move the line (define-registered names) from x.ss to defines.ss
and to export the identifier 'names' from defines.ss. Basically each
module containing
definitions should store its own definitions in an exported name. But
this is akin to
a functional solution without side effects, i.e. I could as well define a macro
define-many

(define-many names
  (define a 1)
  (define b 2))

expanding to

(begin
(define names '(a b))
(define a 1)
(define b 2))

It is easy to implement a module-local registry (but that could be done
without side effects), it is not so easy to implement a cross-module registry.
This is probably telling that a cross-module registry is a bad idea, which is
not a surprising result after all.

Reply via email to