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]

Re: A new module system for Guile



> What do you want a module system for?  Organizing names into
> different scope

Yes. 


> What is one time-honored way to organize ways?  Hierarchies, such as
> nested directories.

In other words: total ordering. Agreed.


BUT:
> For example, it may make sense to have a top-level name-space
> for the "organization" or "maintainer" of a group of modules, and
> separate modules underneath that.

I strongly disagree here. I don't want some people ("maintainers") or an
"organization" being able to hide the contributions from other people
beneath them.  Every contribution, every module should be accessible
from anywhere and by anyone who wants it.

On the other hand there is some truth in what you say. Modules
belonging to a package have a special relationship. For a module of a
certain package it is sometimes necessary to access a _private_ symbol
from another module of the same package. Cecil and Eiffel solve this
problem by declaring some modules as a "friend": 
friendship ::= "friend" module_names ";"

Btw. Scheme48 and others don't support nesting of modules also. :) And
Niklaus Wirth dropped the support of submodules when he designed the
modula2 successor "oberon".


> Also, I just think it is very consistent with Scheme lexical
> scoping to have nested modules:

> (define-module slib
>  (define-module format (... "slib/format.scm"))
>  (define-module random (... "slib/random.scm"))
>  ...)

Hmm, how do you want to access symbols from format.scm? 


Jost