[net.lang] Definition of "Object-Oriented"

macrakis@harvard.ARPA (Stavros Macrakis) (02/01/85)

> I've read several definitions of ... object-orientation...; most of them
> confuse it with abstract data types....  [ADTs are] nice but that
> doesn't make [them] object-oriented. Ada and Modula-2 have all these
> goodies [goodies??] but that doesn't make them object-oriented. I think
> people who know SMALLTALK would agree with me.

Perhaps, but what -is- the distinction?

> ...  "f(x)" would be evaluated in a object-oriented language [by]
> "look at the type of object x is; find a method called f defined for
> that object and apply it to x".  In a procedure-oriented language it
> would be "look at the definition of f and apply f to x".

This is not true of Ada.  f(x) means "call the (unique) f applicable to
x".  For that matter, f(a,b) means "call the unique f applicable to a
AND b" (cf. ST f(a,b), which means call a's f with b as an extra
argument, so it may not be b's f...).  The function itself does no
dispatching on type in Ada.

> It's clear, then, that an object-oriented language has overloading since
> you could have methods with the same name for different objects.
> However, the presence of overloading in a language (like ADA) doesn't
> mean it is object-oriented... -- Eduardo Krell UCLA CS ekrell@ucla-locus.arpa
> 		..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell

Let us leave aside the advantages of Ada overloading (for instance, the
ST mixed-type problem: where do you put the method for scalar
multiplication for vectors?  in the scalar or in the vector?; and the
composition problem: f(g(x)) where more than one g applies to x); and
its disadvantages (primitive inheritance); and other problems with Ada
(e.g. static resolution of type-generic entities).  What is it about the
Ada mechanisms that's the problem?  Perhaps it is the static typing?

What Krell is implying is that this property of attaching operations to
types (Smalltalked: methods to classes) is not central to object
orientation.  Well, why the mystery?  What -is- central to object
orientation?  I can believe the static typing might be it, but I'd like
to hear the argument.

	-s

ekrell@ucla-cs.UUCP (02/04/85)

> > I've read several definitions of ... object-orientation...; most of them
> > confuse it with abstract data types....  [ADTs are] nice but that
> > doesn't make [them] object-oriented. Ada and Modula-2 have all these
> > goodies [goodies??] but that doesn't make them object-oriented. I think
> > people who know SMALLTALK would agree with me.
> 
> Perhaps, but what -is- the distinction?
> 

  I'd say that the language shouldn't have second class citizens, i.e. every-
thing is treated as objects. Not only functions and procedures but control
structures too. That leaves Ada (and all other procedure-oriented languages
that claim to be object-oriented) out.
-- 
    Eduardo Krell               UCLA Computer Science Department
    ekrell@ucla-locus.arpa      ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell