This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Can I make one request/suggestion? I suggest using quoted names, rather than unquoted names, for module-qualified names. That is, instead of (for the function make-random-state in module random in slib): (slib random make-random-state) do: (slib 'random 'make-random-state) The reason is that it provides compatibility with a system where modules are first-class "environment" objects, whose values you can query at run time. In this model, an environment is a mapping (procedure) from symbols to locations. An example of how such a system might look: Definition: [Notice, this is the conceptual structure, and I ignore how things are divided into different source files, separate compilation, etc.] (define-module slib (define-module random (define (random modu . args) ...) (define (make-random-state . args) ...))) Direct usage: ((slib 'random 'random) modulus) Of course, normally, you would use some kind of "import" or "require" form, for example: (import slib 'random) (random modulus) --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner