Python syntax in Lisp and Scheme

David Rush drush at aol.net
Mon Oct 6 06:36:01 EDT 2003


On Sun, 5 Oct 2003 11:55:00 -0400, Terry Reedy <tjreedy at udel.edu> wrote:
> "Shriram Krishnamurthi" <sk at cs.brown.edu> wrote in message
>> "Terry Reedy" <tjreedy at udel.edu> writes:
>>> Lisp (and possibly other languages I am not familiar with) adds the
>>> alternative of *not* evaluating arguments but instead passing them
>>> as unevaluated expressions.
>
>> I'm sorry -- you appear to be hopelessly confused on this point.
>
> Actually, I think I have just achieved clarity: the one S-expression
> syntax is used for at least different evaluation protocols -- normal
> functions and special forms, which Lispers have also called FSUBR and
> FEXPR *functions*.

Well, I got it, and you raised a good point but used the wrong terminology.
To know how any particular sexp is going to be evaluated you must know
whether the head symbol is bound to either a macro or some other 
(preferably
a function) value. The big difference between the CL and Scheme communities
in this respect is that Scheme requires far fewer macros because it has
first-class functions (no need for the context-sensitive funcall). So while
you have a valid point, and indeed a good reason for minimizing the number 
of macros in a program, in practice this is *much* less of a problem in
Scheme.

>> There are no functions in Scheme whose arguments are not evaluated.
>
> That depends on who defines 'function'.

In Scheme (and Lisp generally I suspect) function != macro for any values 
of the above. Both are represented as s-expression 'forms' (which is the 
correct local terminology)

> "If anything I write below about Lisp does not apply to Scheme
> specificly, my aplogies in advance."

No bother...

david rush
-- 
(\x.(x x) \x.(x x)) -> (s i i (s i i))
        -- aki helin (on comp.lang.scheme)




More information about the Python-list mailing list