Python syntax in Lisp and Scheme

prunesquallor at comcast.net prunesquallor at comcast.net
Sun Oct 5 12:15:44 EDT 2003


"Terry Reedy" <tjreedy at udel.edu> writes:

> "Shriram Krishnamurthi" <sk at cs.brown.edu> wrote in message
> news:w7dk77jq26d.fsf at cs.brown.edu...
>
>>"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*.  See the post by Steve VanDevender and my response
> thereto.

There used to be FEXPR and FSUBRs in MacLisp, but Common Lisp never
had them.  They had flags that indicated that their arguments were not
to be evaluated, but were otherwise `normal' functions.

The problem with FEXPRs is when you pass them around as first-class
values.  Then it is impossible to know if any particular fragment of
code is going to be evaluated (in fact, it can dynamically change).
Needless to say, this presents problems to the compiler.

It generally became recognized that macros were a better solution.

So FSUBRs, which were primitives that did not evaluate their arguments
have been superseded by `special forms', which are syntactic constructs.

FEXPRs, which were user procedures that did not evaluate their
arguments have been superseded by macros.

Macros and special forms are generally not considered `functions'
because they are not first-class objects.

> I will let you debate this with LISP authors Winston and Horn.  I also
> read the original SICP (several years ago, and have forgotten some
> details) and plan to look at the current version sometime.

The original Winston and Horn book came out prior to SICP, which
itself came out prior to the creation of Common Lisp.






More information about the Python-list mailing list