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: Guile modularity (was Re: message primitive)


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

> "Greg J. Badros" <gjb@cs.washington.edu> writes:
> 
> > > Guile should of course have a pure R5RS module.  Programs using this
> > > module would be guaranteed a 100% clean environment.  (Yes, 100%.  A
> > > module system which can't support this is flawed.)
> > 
> > My concern is just how does this "pure R5RS" module get used.  Are
> > primitives necessarily in that, do we make the R5RS module undefine the
> > extra primitives, or what?
> 
> I don't understand the question.  The R5RS module provides variable
> bindings for the R5RS procedures and syntactic bindings for the R5RS
> special forms.

I'm just concerned about how primitives that aren't to be in the R5RS
module are forced to *not* be available in that module.  Does the
current module system handle this, or are you just talking about planns
for the new module system?

> Real module systems have no problems with this.  See, e.g., Jonathan
> Rees paper about the Scheme48 module system.

Sure.

> > > I don't think a "simple-format" would do harm in the toolbox module.
> > 
> > And I'd bet it actually would *help*!  Or else I wouldn't have brought
> > this up! :-)
> 
> (It was only meant as a defense against your worries. :)
> 
> I think `simple-format' is OK.  But, still, which situation is nicer?
> 
> 1. The core provides a `simple-format' which provides the "%S" syntax.
>    There's a format library providing `format' which supplies a
>    different "~S" syntax and the whole suite of features from Common
>    LISP.
> 
> 2. The core provides a `format' which provides a subset of Common LISP
>    format functionality.
>    There's a format library which extends the capabilities by
>    providing a new `format' with the previous abilities + the rest.
> 
> Note how number 2 is similar to
> 
>    The R5RS module provides an R5RS set!.
>    The Guile module provides an extended version of set!.
> 
>      or
> 
>    The R5RS and Guile modules provide an R5RS `member'.
>    The SRFI-1 module provides a `member' which takes a predicate as an
>    optional third arg.

I don't know what format from format.scm is supposed to do, since it's
lacking documentation.  Is it just CLisp-style format?

I'm fine w/ making simple-format a subset of format.scm's, but then we
need all the error messages to use the new escape sequences (probably
pretty easy, but it still needs to be done).  Can you propose the
restricted version of format that you're waving hands at?  

Thanks,
Greg

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