[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested Lambda function gives error in common lisp, guile, emacs lisp

From: William D Clinger
Subject: Re: Nested Lambda function gives error in common lisp, guile, emacs lisp but works in scheme. Why?
Date: Sun, 07 Oct 2007 19:58:15 -0700
User-agent: G2/1.0

David Rush quoting a Common Lisp programmer:
> > order to treat a first-class value as a function, you have to shift it
> > via FUNCALL. In order to yield a function as a first-class value, you
> > have look it up with FUNCTION.
> Makes it sound  like there are two fundamentally different *types* of
> values And FUNCALL and FUNCTION are the type cast operators between
> those types. Is this a valid way of looking at this?

No, but that invalid way of looking at it may be
common among Common Lisp programmers.

What's really going on is that Common Lisp,
as a Lisp-2, needs some way to distinguish
the environment in which variables are to be
resolved.  That's the purpose of FUNCTION.

Then, to avoid the syntactic clutter of using
FUNCTION in the operator expression of
almost every call, Common Lisp evaluates
operator expressions differently from operand

If you can regard higher-order functions as
unnatural, then you can regard Common Lisp's
semantics as natural.  That's the real lesson
of the Gabriel/Pitman paper cited earlier in
this thread.  By the way, that paper was not
subject to normal peer review; it was political
from the start, and its conclusion that the
advantages and disadvantages of Lisp-1 and
Lisp-2 are comparable was pre-ordained.

To reach that conclusion, they had to count
at least one of the arguments against Lisp-2
as an argument in favor of Lisp-2.  I won't
spoil your fun by explaining this; it's obvious
if you read the paper carefully with an open


reply via email to

[Prev in Thread] Current Thread [Next in Thread]