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: Naming modules (was: Re: getop-gnu-style.scm)


Hi!

>>>>> Maciej Stachowiak writes:

 MS> 1) Modules that come with the Guile core.
[...]
 MS> * (guile ...) for modules from category 1 which do not fit well
 MS> anywhere in the category 2 hierarchy.

Why not (lib guile ...)?

 MS> The repl would be a good example of this.

Yes and no.  It is not hard to generalize the repl so that it is
useful to other programs besides the default `guile' binary.  In fact,
this is what Gush is already doing.  I've put this work into (lang
repl), though I could easily move it somewhere else....

 MS> * (lib <library name> ...) for externally developed
 MS> libraries/comprehensive packages which are not guile-specific and
 MS> have their own organization. [...]

 MS> * (app <application name> ...) for modules that come with an
 MS> application and only make sense in the context of that
 MS> application. [...]

I don't know if it is useful to distinguish between these two.  My
personal preference would be just to use (lib gush ...), and leave it
at that.  Then, as people decide that a given module is useful to more
than just Gush, we would move it out into the by-function namespace.

 MS> I guess the main difference between this proposal and Jim's is
 MS> that I advocate special prefixes for library-specific or
 MS> app-specific code (mainly to nicely segregate it), and that I
 MS> propose that projects that ship generally useful code in addition
 MS> to the app itself should put it in the generic functionally
 MS> defined namespace.

I like this.

 MS> To address this specific example, I hope Gord makes much of this
 MS> code generally useful even outside of GUSH.

I'm trying to do this.

 MS> Obviously there will be some GUSH-specific items such as his
 MS> implementation of fast-loading applet scripts; but I get the
 MS> impression he plans to implement many things like syntax
 MS> translation and access to system facilities that many people have
 MS> wanted to be general Guile features for quite some time.

Yes, absolutely.  Gush is less of an application program, and more of
an evolving framework for how syntax translators could be implemented.

 MS> Of course, my proposal to apply functional category naming as
 MS> broadly as possible causes a slight problem if two different
 MS> people both want to create a termios interface. But I am not so
 MS> sure this is necessarily a problem.

Exactly.

 JB> You'd also like your naming system to give some confidence that
 JB> module names won't change often.  I guess the project-name-prefix
 JB> approach is okay in this regard.

It doesn't matter how often module names change if their interfaces
are still changing.  This puts us smack dab in the middle of another
can of worms: interface versioning.

-- 
 Gordon Matzigkeit <gord@fig.org> //\ I'm a FIG (http://www.fig.org/)
    Lovers of freedom, unite!     \// I use GNU (http://www.gnu.org/)

Copyright (C) 1998 FIG.org; the creator offers you this gift and wants it
to remain free.  See http://www.fig.org/freedom.html for details.
  This work may be copied, modified and distributed under the GNU General
  Public License (GPL).  See http://www.gnu.org/copyleft/gpl.html.