How do you define "object-oriented"?
drozenfa at yahoo.com.ar
Fri Apr 26 20:33:30 UTC 2002
First of all, I don't know enough about CLOS or
Phyton, but anyway, here are my 2 cents:
> A language is object-oriented if it supports
> 1. Encapsulation
> 2. Inheritance
> 3. Polymorphism
Self hasn't Inheritance, at least Class Inheritance
(the one implied in this Wegner's definition), but
delegation. And I consider it VERY object oriented.
In my opinion, Object-orientation is: Objects
communicating through message passing.
This *simple* yet powerful definition brings up a lot
of issues that go beyond the syntax of the language.
It implies a certain kind of environment, a certain
development cycle other than edit-compile-link-execute
(because in the meantime there are no objects), etc.
In his message (Fri Apr 19, 2002 3:30 am), Jim Benson
"Squeak is live objects".
And Andrew Black in his commentary (Thu Apr 26, 2001
3:57 am, BTW what a beautiful message):
"Everything is an object, duh ... such a simple idea,
yet I'm still being surprised by its profundity."
I think that one of the main difficulties in defining
and understanding what OO is, is not in what this
definition SAYS, but in what it DOESN'T.
People tend to think that something becomes OO when
you ADD object and messages (and polymorphism,
encapsulation, whatever-else-you-like) to something.
Just as Bjarne's did.
Well, I think something is OO when it is ONLY (or at
least with the least possible overhead) Objects and
Messages. Just a few examples:
No compile-TIME (you compile while objects exist): It
is not in the definition
No edit-TIME (you edit while objects exist): It is
not in the definition
No NON-OBJECTs (even messages are objects): It is not
in the definition
No classes (build them if you need to, but they
are not a native construction): It IS in the
Simplicity: It IS implicit in the definition.
As in EVERY good design, and I mean every, not only
software. Remember the KISS (Keep It Simple, Stupid)
methodoly used in avionics.
With this definition, Smalltalk is not *pure* OO.
But then, as happens with ANY definition, no
And that's why I agree with Nevin Pratt in that there
is a whole "Grey Scale" of Object Orientedness.
I would love to hear Jecel Assumpcao's shot on this
issue. And of course Alan's.
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
More information about the Squeak-dev