[pro] Lisp 2's and function values.

Matthew D. Swank akopa at charter.net
Wed May 25 02:51:48 UTC 2011


I have implemented a small fexpr interpreter in Common Lisp based on
Kernel http://web.cs.wpi.edu/~jshutt/kernel.html. Right now it's a Lisp
1, but I am considering trying to make it a more idiomatic extension of
Common Lisp by making it a Lisp 2.

Part of the Lisp 2-ness of the Common Lisp evaluator is that the car of
a form must name a function, macro, or special form. This name is either
a symbol bound in the function name space, or a lambda expression.
However, Kernel just requires the car evaluate to a combiner (this is
what Kernel calls a generic operator). Obviously, in a Lisp 2, a symbol
would evaluate to the value bound to it in the function name space. 
However, consider the following:

((returns-a-function) arg arg ...)

Would it be reasonable to allow this as a legal form as well?

I'm not arguing Common Lisp should work this way, but I seems to make
sense in the context of a Kernel like evaluator.

Matt




More information about the pro mailing list