Brian Harvey scripsit:

> Personally, I couldn't care less about modules -- I'd be happy for WG1
> Scheme not to have them -- but it's very important to me that there
> be no such idea as "macro-time" or "compile-time" or anything-time in
> WG1 Scheme.  There is only REPL-time.

With the exception of SCM, all implementations of R5RS that I know of,
including both interpreters and compilers, expand macros in a top-level
form before executing the resulting code.  Not doing so makes macro
hygiene very difficult.  SCM is able to avoid doing so because it has
first-class lexical environments, which other implementers seem to
believe are a cure worse than the disease.

In a REPL, of course, there is a continual alternation between macro
expansion time and run time as new forms are entered.  In particular,
however, if you write

        (defun x (include "three.scm"))

where the file "three.scm" contains simply the single character 3,
this is the same as writing

        (defun x 3)

Note that the argument to include must be a string literal, and cannot
be an arbitrary string-valued expression; this limitation does not apply
to load.

-- 
John Cowan  [email protected]  http://ccil.org/~cowan
Female celebrity stalker, on a hot morning in Cairo:
"Imagine, Colonel Lawrence, ninety-two already!"
El Auruns's reply:  "Many happy returns of the day!"

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

Reply via email to