[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
S&I's idea of EQ?
I know Sussman is too shy to send out messages, so I'll repeat what he
told me recently, which is that being able to use EQ? to recognize
particular procedures (i.e. (let ((p (lambda ...))) (eq? p p)) => true)
is deeply and explicitly wired into his book, and into the way he
teaches and programs. For example, see the constraint system, pages
234-240 of Structure & Interpretation, and in particular the definition
of the subprocedure ME of MULTIPLIER, page 237. Therefore he would be
very sad if Scheme changed out from underneath him. He is sick of
moving targets and would like a stable language compatible with what
he's been calling Scheme all these years, even if it has serious
problems.
As another source of argument against the LAMBDA-as-behavior position, I
should say that my reading of the Common Lisp manual is that (let ((p
(lambda ...))) (eq? p p)) must definitely return true. Only numbers are
permitted to fail to be EQ to themselves. So if you believe that Scheme
shouldn't gratuitously differ from CL, then all objects besides numbers
should be "EQ to themselves".
As both Sussman and Halstead have suggested, one option is to have TWO
forms for creating procedures, one which creates a callable <behavior,
location> pair, like the current Scheme and Common Lisp LAMBDA, and
another which only returns the operational behavior, which is the change
to LAMBDA that the Yale, TI, and Tek contingents want to institute.
This would be needed anyhow in those implementations interested in
emulating Common Lisp or a subset of it. I would guess that this would
be easy to do in most existing implementations. If this is agreed to,
then we have a naming problem on our hands, argument over which,
unfortunately, might do this idea in (which one gets the name LAMBDA,
and what should the other one be called?).
Jonathan