[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Needed: a non-superceding LOCALE
From: johnson@Yale-MBUILD
Why is there no special form which evaluates some body in a given environment?
I.e., something like LOCALE, but which does not obliterate the previous
definition of an environment. For example, one might have an existing
environment, say *FOO-ENV*, in which some procedure FOO is defined.
In order to trace FOO, one must say
(EVAL '(TRACE FOO) *FOO-ENV*) .
EVAL seems clumsy here, since the form being evaluated is really static.
First of all, I believe you could have said
(TRACE (*VALUE *FOO-ENV* 'FOO)).
Can you think of other applications? (I believe they exist, just
curious to know what they are.)
Secondly, we've been toying with the idea of "imbedded static
compilation" of expressions, but this is hard to do with the current
TC. The exact syntax of this, and the desirability of it, are still
not clear, but it probably would mean some special form which evaluates
to a compiled code object which could then be passed to
RUN-COMPILED-CODE. E.g.
(RUN-COMPILED-CODE (COMPILED-CODE (TRACE FOO)) *FOO-ENV*)
(perhaps with extra syntactic sugar to make this common idiom less
verbose). But nothing like this can be implemented until there are
major TC changes (or a new compiler exists).