Hello,

Sebastian Tennant <[EMAIL PROTECTED]> writes:

> The macro definition I was searching for is simply this:
>
>  (define-macro (definer var val) ;var must be a symbol
>    `(module-define! (current-module) ,var ,val))
>
> Wrapped within a 'for-each' this macro allows me to bind as many
> variables as a like in a single stroke.
>
> Why not use the module namespace as a top-level hash table Dale?  Isn't
> that essentially what a module namespace is, or at least what it's for?
>
> Is there a really good reason to avoid doing this?

Dynamic binding definition is compilation-unfriendly.  Kjetil's proposed
`define-lotsof' macro is more appropriate, as it can be fully evaluated
at compile-time (should a compiler be used, that is), whereas the
`module-define!' trick requires that compilation and execution be the
one and same phase.

Thanks,
Ludo'.



Reply via email to