On 14 Oct 2009, at 6:30 am, Brian Harvey wrote:

> And I repeat (ad nauseam if necessary) that no word suffixed with "-
> time" is
> admissible in a discussion of WG1 Scheme, except for "REPL-time,"
> which is
> admissible solely as a rhetorical counter to those other -times. :-)


See, now, Brian is getting a lot of flack for "only being interested
in the REPL"; but, I suggest, this is not incompatible with the wishes
of compilers, if you consider compilation as a form of optimising REPL-
image-storage.

Sure, load your highly-dynamic modules that perform arbitrary macro
tricks (without needing phasing!) to generate their very own module
headers or whatever, into a giant REPL, and end up with a single
closure that represents what you want to happen when people run your
program - and then ask your system to persist that closure to an ELF
executable. As it's now a closure, all the macro-expansion and module-
tracing and whatnot will be done.

And what of separate compilation? Easy - just ask your system to
persist a module object to disk. You'll probably get a .so with a
special entry point that that fills in a structure with Schemely
information about exported symbols, and a bunch of compiled code for
the code of closures (be they exported as procedures or as macros) and
initialised data for the non-code values.

I think there's no reason why nice, simple, elegant REPL semantics are
a problem for compilers (and they don't even need to be Sufficiently
Smart Compilers). Yes, you need to move away from traditional notions
of compilation, but valuable metapgramming features force that on us
anyway: for the simple reason that compilation involves a lot of
execution of arbitrary code rather than just a static analysis.

Don't feel we have to compile Scheme like we compile C.

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/archives/author/alaric/




_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to