This is the mail archive of the guile@sourceware.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 module system should resolve, not introduce, name conflicts


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> Since, in the vast majority of cases, code in a module doesn't use the
> configuration language, the configuration language bindings shouldn't
> be on the default import-list.

If you use `(module (my test) (open (ice-9 debug)))' they aren't,
but if you use (define-module :use-modules(ice-9 debug)) it imports 
almost everything (for backward compatibility) + ice-9 debug.



> > Scheme48 has other problems, for example it specifies a
> > "meta-language" --- ",in" for example which lets you jump from one
> > module to another in the repl.
> 
> This is not a problem but a strength.  As I've pointed out earlier,
> it's not a good idea to be forced to import bindings for walking
> around modules in every module.

You don't have to.  Just terminate the repl.  If you terminate
the current module's repl, you return to the repl of the config
module in which the complete module configuration language 
is available.  Note that in the future there may be more 
than one module which exports a module configuration language.


> It seems quite obvious that what you want to import is the bindings
> which the code in your module uses, and nothing else.  It also seems
> obvious that you would like the metalanguage to stay constant while
> walking around among modules.

Exactly.


> > Guile can't use such a meta-language because every module
> > may have its own repl.  A module written in tcl for example
> > may have a tcl repl, a module written in perl may have
> > a perl repl etc.
> 
> This is exactly why the meta-language should be associated with the
> repl instead of being implemented by bindings imported by individual
> modules.  There is no reason why the Guile Scheme repl can't use the
> meta-language in Scheme48.

How that?  The package (lang tcl) may contribute its own repl
which interprets tcl syntax, the perl package may contribute
its own repl which interprets perl syntax.  Isn't ",in"
a valid perl construct?  


Jost

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]