[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commonlisp types
Date: Thu, 22 Dec 88 15:17 EST
From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
Date: Fri, 2 Dec 88 11:33:22 EST
From: Guy Steele <gls@Think.COM>
Date: Fri, 2 Dec 1988 00:40-EST
From: Jamie.Zawinski <jwz@spice.cs.cmu.edu>
...
Can someone explain the rationale behind forcing SATISFIES to
accept only function-names and not lambda expressions?
....
Fyi, it turns out this rationale doesn't hold as much water as you'd think.
Consider:
(defun bar (x) (symbolp x))
(defun foo (x)
(flet ((bar (y) (integerp y)))
(typep x '(satisfies bar))))
(foo 'x)
The correct answer is T, but I bet a lot of implementations return NIL
in compiled code.
....
The real truth is that we thought the scoping problems were limited to
LAMBDA expressions because we weren't used to reasoning about FLET, which
was a new construct at the time we designed CL. If we had it to do over,
I'd certainly be lobbying strongly for permitting lambda expressions.
You're right. I think what really happened is not that we weren't used
to FLET, but that FLET and LABELS were added to the language after
type-specifiers had been designed, and the full ramifications of FLET on
the rest of the language were not explored at the time it was added.