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

Re: Jonathan Rees on OO



Allow me to clarify.  The message was written in haste for a friendly
audience, so was not as coherent as it might have been.

My main point is that "object-oriented" and "object" are not well
defined, and before you engage anyone in a discussion of them with
anyone, you need to agree on definitions.

I think there are three main definitions of "object" in use:
  a. Simula-67's (also Java's), which is fundamentally my item 9
     (objects have a set of named methods) and secondarily item 8
     (implementation inheritance)
  b. Actors, which is item 6 (message passing) with 2 and 1 as corollaries
  c. Lisp objects, items 4-5 (with or without items 6, 8, or 9)

I ignore my own advice starting in the paragraph that says "the C/C++
folks see OO as ...".  Here I am doing just what I tell everyone not
to do, which is to assume a particular definition.  The definition I
used in this paragraph was Simula's.

I also ignore my advice in my anti-OO rant on e-lang.  The thread
there was mainly anti-OO sensu Actors, but I also included some
anti-Simula-OO stuff in there.

It appears you [Scott McKey] assumed I was critiquing the Lisp
definition, when I meant the Simula definition.  This merely
reinforces my point that the terminology situation is abominable.

If CLOS and Dylan claim to be OO, then their definition of OO has to
be Lisp's (c, above).  But they obviously aren't OO in the Simula or
Actors senses.  This is exactly what you like about them.  But the
terminology confusion may contribute to the lack of acceptance of
generic functions in mainstream languages.  You are trying to invade
linguistic territory (the space of the meaning of "OO") where you're
not wanted.  I can see why you'd want to do that, since OO has such
cachet, but perhaps a different buzzword would be in order.

  Dylan advocate: "Dylan is OO [sensu Lisp] and a better OO [sensu Lisp]
  than Java."  True.

  Java/Smalltalk/Actors advocate: "How can you possibly say that Dylan
  is OO [sensu Simula or Actors]?  It isn't OO at all."  Also true.

Now, as to which definition is the "best" -- well, if you don't care
about my opinions, stop reading.

I'm agnostic on which definition of OO is best.  If I were interested
I would do some scholarship to find the historical precedent for its
use in the 1960's and 1970's, starting with Simula-67, Actors, and
Smalltalk, and advocate use of those definitions.  If it turned out
that the Lisp world or someone else used the terms technically earlier
than that, I'd probably advocate that usage.

Another approach is to allow mob rule - to take OO to mean what the
majority of the software industry takes it to mean.  In this case it
clearly has the Simula/Java meaning.

I don't know how to trace the precedent of the Lisp definition.  My
hunch is that it's relatively late, perhaps having to do with Hewitt
(1974) and/or the growth of new types (yes, "object" types) in Maclisp
and Interlisp.  When I was at MIT in 1979 the term "object" still felt
new and stylish.  But no one said Lisp itself was object-oriented that
I can remember, until maybe Sussman and Abelson's course came along
(scholarship anyone?).

As far as I know, only people with Lisp and academic backgrounds take
the Lisp and Actors definitions seriously, even though they are the
more principled ones.

As for OO programming, I actually like and use and implement OO
techniques in all three senses.  They are fine when positioned as
tools drawn from a larger toolkit.  A Scheme implementation I worked
on in the '80's was deeply OO in a somewhat Simula-ish sense, and Kent
Pitman and I invented a nice generic function syntax and semantics for
it (which, many years later, was adopted and extended by CLOS and then
Dylan).  I can't say that CLOS is to my taste, but I did add simple
generic functions with n-way dispatch to Scheme 48 fairly recently,
around 1993 (this turned out to be poorly executed, but that's another
story).  So what homework haven't I done?

I don't think languages should be fundamentally OO in any of the three
senses, but any disagreement along these lines can probably be
remedied by a redefinition of terms.

I don't see how you can say I'm an anti-OO zealot.  It's only when any
of the three models is put forth as a world view or panacea (as in
Java), or when people talk past one another because they fail to be
clear on terminology, that I get huffy.

Jonathan