[pro] Lisp 2's and function values.
Matthew D. Swank
akopa at charter.net
Wed May 25 23:34:44 UTC 2011
On 05/25/2011 06:45 AM, Martin Simmons wrote:
> It seems like an interesting extension of the term "Lisp-2" -- as well as just
> specifying different namespaces, the proposal is to have a different evaluator
> for the car of the form. In fact, CL already has one, but it is very limited.
>
> If that evaluator allows macro forms, then a macro that expands to a symbol
> should work as if the symbol was used directly. If you use such a macro with
> (funcall (return-something) ...), then you are using the regular evaluator for
> the macro form.
Well, the concrete interpreter I am working on uses a form of fexprs as
the fundamental operators in the language. There wouldn't be macro
'phase' as such to consider. For ((returns-something) arg ...) to work like
(funcall (returns-something) arg ...) the evaluator, in addition to
evaluating compound expressions that occur in the car of a form, would
need to coerce those expressions that evaluate to symbols.
In a purely Common Lisp context, if the expression in the car is "macros
all the way down", you could make a case that form as a whole should be
evaluated in a macro context. That would be interesting to debug as well.
Matt
More information about the pro
mailing list