[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Guy Steele <gls@THINK-AQUINAS.ARPA>, common-lisp@SU-AI.ARPA
- Subject: Function cells
- From: David C. Plummer <DCP@SCRC-QUABBIN.ARPA>
- Date: Thu, 20 Feb 86 18:27 EST
- In-reply-to: <860219154017.1.GLS@KATHERINE.THINK.COM>
Date: Wed, 19 Feb 86 15:40 EST
From: Guy Steele <gls@THINK-AQUINAS.ARPA>
My memory is that a question arose as to whether, given that function
cells and value cells were to be distinct, they should have identical
binding mechanisms or not. There was no compelling reason to allow
special binding of function names, and the following argument was
advanced against such special bindings: multiprocessing implementations
of Lisp might well prefer to use deep special binding, and it was
undesirable to have to deal with the deep binding mechanism for function
lookups, given that most function-name references, unlike most
variable-name references, occur free. I recall that this was the
deciding argument that eliminated special binding of function names from
Common Lisp, thereby making function names and variable names dissimilar
in their semantics and further discouraging their merging.
This is one reason I usually give people who ask me. Consider another
reason: Suppose you allowed deep binding of function cells as 'part of
the language'. What would happen if you bound #'CAR? Doesn't this
effectively force every function to be a true function, even if the
hardware happens to be able to do the operation 10+ times faster than it
takes to do a function call? 'Well, you aren't allowed to (deep) bind
inline functions or functions that compile into instructions.' isn't a
good answer because then we have to agree on what these are, and we
might as well not be a portable language any more.
I can report that much of the time I am very happy to have the two names
spaces be distinct. I get very unhappy whenever I find myself inventing
functionals (functions that take other functions as arguments or return
other functions as values) for various purposes. For example, I have
found it semantically convenient to do so in Connection Machine Lisp.
In these situations I find the need for interpolated occurrences of
"funcall" and "#'" extremely annoying.
I read this last paragraph 3 times and am under the impression you
change your mind on each sentence. I'm really curious what you meant!