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: Where should guile modules store meta data?



> I suppose that a fully paren'ed syntax might have nicer 
> theoretical properties.  The current notation has the 
> advantage of being easy on the simple user.  One possible 
> solution is to have a module delimited by a finish-module 
> form or an end of file.

I prefer the idea of a fully paren'ed syntax. How about we put some
thought into making the theoretically ideal nice for the user, instead
of figuring out how to make what's nice for the user more clean?

What are the issues with paren'ed syntax? One issue is how it would work
from the command line in interactive mode. Perhaps one way it could work
is you type...

> (define-module (my hack)

and it comes back with the prompt....
(my hack)>

Now anything you type in is just like at a regular scheme prompt except
that it is scoped to the module...

(my hack)> (define a 134)
(my hack)>

When we want to complete this module we type
(my hack)> )
> 

to exit that scope. And if you're typing code into a decent editor like
emacs, I can't see the issue, since it will format it nice and neat.


What am I missing here? Is it so hard?



> 
> Using the syntax of the old module system from the keyboard or in a
> file it might work like this:
> 
> (define-module (my hack))
> (use-modules (my other hack))
> (define a 134)
> (define b (lambda () a))
> (export b)
> (finish-module)
> 
> Cheers,
> 
> Clark

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