[Larceny-users] incremental development in ERR5RS/larceny

William D Clinger will at ccs.neu.edu
Sun Mar 15 15:45:48 EDT 2009


Jose A Ortega Ruiz (jao) wrote:
> Now, i'm wondering to what extent such an interactive way of hacking is
> possible in ERR5RS and, in particular, its Larceny incarnation (R6RS
> being out of the question since it ditchs the REPL). If i'm
> understanding things correctly, the ERR5RS "equivalent" of, say, a CL
> package would be an R6RS-style library. What i would like is to be able
> to eval or re-eval a library A's body forms individually, so that other
> libraries using A would use the new definition automatically. But that
> doesn't make sense for libraries, since their evaluation semantics are
> defined as a whole, and they must be reloaded as a whole when modified,
> right?

Right.

> So, if i'm getting this right, the closer i can get in Larceny to my
> ideal world is re-compiling and re-loading the library at hand (and all
> the libraries that import it) everytime i modify any form in its body or
> import/export specifications.

Right.  In native Larceny, you wouldn't have to compile the
changed library, because native Larceny compiles everything
it loads.

Note, however, that re-importing the library won't do anything,
because libraries are imported only once.  You really would have
to call the ERR5RS load procedure (which you can import from the
(larceny load) or (err5rs load) libraries) to load the library
after making the change.

And then you'd still have to import the library again to make
the loaded library replace its original version in your REPL,
and you have to re-load (not re-import) all libraries that
depend on the changed library as well.

> And it actually makes no sense to think
> about evaluating expressions in a library's namespace (as you would do
> for instance in s48 with ,in, or in CL after an in-package form).

It might make sense, but there would be a lot of questions
about its semantics, and there is no provision for it in the
R6RS, in ERR5RS, or in Larceny.

Will



More information about the Larceny-users mailing list