guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic variable binding


From: Sebastian Tennant
Subject: Re: Dynamic variable binding
Date: Thu, 13 Nov 2008 11:33:29 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Quoth Sebastian Tennant <address@hidden>:
Hi all,

Many thanks to all responders, especially to Ludo' for answering my
question directly.

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?

Apart from non-portablility, what difference does it make whether a
variable is bound using 'define' or my 'definer' macro?

Thanks once again.

Sebastian







reply via email to

[Prev in Thread] Current Thread [Next in Thread]