Joe Marshall wrote:
> So am I right in assuming that you were thinking of FEXPRs in the
> general case rather than the way SCM uses the term?

SCM fexprs can't (in general) be expanded until run-time so I'm
not sure what you are asking.   Hobbit (the compiler that come's
with SCM) compiles only a subset of programs, as far as I recall.
Actually, it's useful that SCM's fexprs have this property: it makes
it possible to write domain-specific incremental (re-)compilers
in Scheme.

Fexprs just add a new rule to application:  if the first position of an
application points to a fexpr, arguments are unevaluated but
the result an expression which is itself evaluated.

I'd like fexprs in combination with first-class environments
which are reified if and only if their lexical scope includes
a call "(the-environment)".

Those features should be optional because they can be expensive
to implement yet they are hardly ever directly needed.

They should be spelled out because they are a trivial, obvious,
and useful generalization of the basic operational model
of Scheme.   They're useful, in part, because things like
PLT-style modules or modern macro systems can be expressed
cleanly in terms of fexprs and environments, and in ways
in which the fexprs and environments naturally "fall out"
from the code after a little partial evaluation.   At the same
time, those very same implementations that a compiler can
eliminate by partial reduction, are pragmatically useful
in interpreters.

So, if R6 added little more than optional fexprs and environments,
quite a lot else that's big, new and complicated in R6 could be
implemented, portably, albeit on optional features.   Implementations
could, as they do now, skip the optional features and use
custom implementations of *SRFIs* like a module system.

-t






>
> On 5/27/07, Thomas Lord <[EMAIL PROTECTED]> wrote:
>> Thomas Lord wrote:
>> > In the *general case* you can't expand fexpr-style macros at
>> > run-time however
>>
>> ur... that's "until" run-time, not "at," of course.
>>
>> -t
>>
>>
>
>


_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to