[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function ballot
- To: common-lisp at SU-AI
- Subject: function ballot
- From: Earl A. Killian <EAK at MIT-MC>
- Date: Thu, 02 Dec 1982 01:17:00 -0000
Some time ago I sent out a message suggesting that a cons with
its car eq to lambda not be considered a function. No one
replied negatively. However, the issue was omitted from the
various ballots that were taken. I'd really like to survey
peoples opinions on this, and remove this requirement from Common
Lisp if there is a consensus.
Briefly, as in Lisp 1.5, the Common Lisp manual currently
specifies that the LIST
(lambda (x) (+ x 1))
is a function. In particular, one can write
(apply '(lambda (x) (+ x 1)) '(5))
I consider retaining this in Common Lisp to be a wart. Common
Lisp programs should write
(apply #'(lambda (x) (+ x 1)) '(5))
instead. There are no advantages to allowing the list as a
function, except maybe compatibility. There are disadvantages:
inefficiency, confusion (with respect to lexical scoping), and
needless complexity. As far as compatibility goes, it is
completely minor, as the functionality still exists, just with a
minor syntax change, and most Maclisp programs already use #'.
Also, nothing prevents an implementation from supporting lists
beginning with lambda as functions: I am only suggesting that
portable Common Lisp programs not use this.