Francois-Rene Rideau wrote:
>
> In article <335C8066.1562@sonic.net> Ray Dillinger <bear@sonic.net> writes:
>
> First things first. I am not a standards body, nor a journal,
> and as far as I know there is not going to be a conference
> on this topic. I'm a user, and a would-be language implementor,
> trying to elicit opinions from people about what ought to be
> in standard scheme libraries for WIMP, multimedia, and FFI.
>
> Before all these can be achieved,
> the first thing needed is a one real __standard__ module system
> with functors, like what is available in *ML.
> First-class environments could trivialize that,
> but they are not standard, either.
> Without modules, you'd end up with a large bloated namespace
> of predefined functions, and I think all the purpose
> of Scheme vs CommonLISP would be lost...
I agree that we need some kind of standard way of doing modular
programming: But I see it mainly as a compilation-methods issue
rather than a namespace issue.
Most of the programs I work on, I put in one huge file. Every
time I change three lines, I recompile the whole %^&* thing.
This is plainly not the way to do it, but Scheme systems that
support programs that have multiple files are rare. The idea
of standard libraries assumes that the library code can sit in
its own file and you can write programs that call it, rather
than copying the contents of that file into the top of your
sourcecode file.
So here's a proposal:
=============================================================
|(compile port1)
|Port1 must be a port open to read scheme source code (most
|likely the result of opening a source file to read). This
|expression returns a port open to read compiled scheme source
|code. The exact format of compiled scheme source code is
|implementation dependent; it can be machine code or bytecode;
|a "pure" interpreter may even simply write whatever it reads
|from port1 directly. An error is signaled if what is read at
|port1 is not valid scheme code.
=============================================================
|(include port2)
|port2 must be a port open to read compiled scheme code.
|Evaluating the include expression has the same effect on
|the environment that evaluating the expressions whose compiled
|forms are read by port2 would.
=============================================================
Questions? Comments? Additions? Corrections? How would you
improve this proposal?
Bear
|