comp.lang.ada
 help / color / mirror / Atom feed
From: Ray Blaak <blaak@infomatch.com>
Subject: Re: friend classes in ada95
Date: 2000/04/20
Date: 2000-04-20T00:00:00+00:00	[thread overview]
Message-ID: <ud7nk4twg.fsf@infomatch.com> (raw)
In-Reply-To: 8dmjsq$vm9$1@nnrp1.deja.com

Robert Dewar <robert_dewar@my-deja.com> writes:
> In article <m3hfcxjt22.fsf@ns58.infomatch.bc.ca>,
>   Ray Blaak <blaak@infomatch.com> wrote:
> > OO programming being essentially about ADTs covers the most
> > important and worthwhile point. What makes OO programming
> > different from ADTs, in least in my opinion, is language
> > support for inheritance and polymorphism.
> 
> nope! that has nothing to do with object oriented programming.

Well, "nothing to do" is a little strong. All of the OO languages give exactly
these features, and saying a language is an "Object-Oriented" language has
some meaning precisely because of this fact.

> Example. Suppose we define an abstract algebra as a tagged
> type. The operations are purely value oriented (e.g. operation
> + on two elements computes a third element).

I am perfectly comfortable with calling this OO.

> What does not make sense is to think of this as object
> oriented programming, since the two fundamental components
> of objects:
> 
>   1. state, so that objects can be changed

Are you saying that only mutable things can be considered as objects? That
seems extreme to me. 

>   2. methods with message passing semantics so that the
>      operations are viewed as passing a message to the
>      distinguished object (the prefix in languages that
>      use this syntax)

I think I agree with this one (that it is fundamental to OO), although I point
out that there does not have to be a single distinguished object (e.g. Common
Lisp's object system works in general with multiple distinguished
objects). The important thing is the conceptualization of the problem into a
collection of entities that are responsible for doing things to themselves and
each other.

> are completely missing.

I would assert that your example actually has both of the
characteristics. With regards to state, even if there is no specifically
modelled state, one still has object identity in relation to other objects
(e.g. A+B is (often) different from both A and B). With regards to message
semantics, the "+" operator would presumably be implemented by doing some sort
of evaluation of its arguments, "asking" them questions about themselves ("who
are you?" at the very least).

> If you think that OO is simply about ADT's then you are back
> in the 60's and have missed something :-)
> 
> On the other hand, if you think that type extension, information
> hiding, and dynamic dispatching are ONLY about object oriented
> programming, then you have also missed something!

It's a matter of semantics. "Object-Oriented" as a term tends to be fairly
vague, which is why we have threads like this. I like programming by
conceptualizing the problem in terms of "objects", and using type extension,
information hiding and dynamic dispatching. I don't necessarily use all of
these features simultaneously. I call it OO anyway. I don't think I am alone,
but I am not that worried about it.

The important thing for me is to make robust, well-designed and maintainable
software. OO as a term is really only important to me during job interviews.

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




  reply	other threads:[~2000-04-20  0:00 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-14  0:00 friend classes in ada95 Stefan Folkesson
2000-04-14  0:00 ` swhalen
2000-04-14  0:00 ` Florian Weimer
2000-04-14  0:00   ` Stefan Folkesson
2000-04-14  0:00 ` Julian Day
2000-04-14  0:00   ` Steve Folly
2000-04-14  0:00     ` Robert A Duff
2000-04-17  0:00       ` John J. Rusnak
2000-04-18  0:00         ` Vincent Marciante
2000-04-18  0:00           ` John Rusnak
2000-04-18  0:00       ` Steve Folly
2000-04-14  0:00 ` John J. Rusnak
2000-04-15  0:00 ` Jeff Carter
2000-04-16  0:00   ` Robert Dewar
2000-04-16  0:00     ` David Botton
2000-04-17  0:00       ` Robert Dewar
2000-04-17  0:00         ` David Botton
2000-04-18  0:00           ` friend classes in ada95 (long) tmoran
2000-04-18  0:00             ` David Botton
2000-04-18  0:00               ` friend classes in ada95 Stanley R. Allen
2000-04-19  0:00               ` MI, was " tmoran
2000-04-19  0:00                 ` David Botton
2000-04-19  0:00               ` friend classes in ada95 (long) Brian Rogoff
2000-04-19  0:00                 ` Hyman Rosen
2000-04-19  0:00                   ` Brian Rogoff
2000-04-23  0:00                     ` Hyman Rosen
2000-04-23  0:00                       ` Brian Rogoff
2000-04-24  0:00                         ` Hyman Rosen
2000-04-25  0:00                           ` Brian Rogoff
2000-04-25  0:00                             ` Ole-Hjalmar Kristensen
2000-04-19  0:00                 ` David Botton
2000-04-17  0:00         ` friend classes in ada95 David Botton
2000-04-18  0:00       ` Geoff Bull
2000-04-18  0:00         ` Jean-Pierre Rosen
2000-04-18  0:00           ` John Rusnak
2000-04-19  0:00             ` Robert Dewar
2000-04-18  0:00           ` David Botton
2000-04-18  0:00           ` Pascal Obry
2000-04-18  0:00           ` tmoran
2000-04-18  0:00             ` John J. Rusnak
2000-04-19  0:00               ` Jean-Pierre Rosen
2000-04-19  0:00               ` Geoff Bull
2000-04-19  0:00                 ` Robert Dewar
2000-04-19  0:00                 ` Ehud Lamm
2000-04-19  0:00                 ` David Botton
2000-04-19  0:00                   ` Robert Dewar
2000-04-19  0:00                   ` Robert Dewar
2000-04-20  0:00                     ` Geoff Bull
2000-04-19  0:00                 ` Jeff Susanj
2000-04-19  0:00                   ` tmoran
2000-04-19  0:00                   ` Robert Dewar
2000-04-19  0:00                     ` Jeff Carter
2000-04-19  0:00                       ` Ray Blaak
2000-04-20  0:00                         ` Jean-Pierre Rosen
2000-04-20  0:00                           ` Ray Blaak
2000-04-20  0:00                             ` Jean-Pierre Rosen
2000-04-24  0:00                               ` Ray Blaak
2000-04-20  0:00                           ` Robert Dewar
2000-04-20  0:00                             ` Jean-Pierre Rosen
2000-04-20  0:00                             ` BSCrawford
2000-04-20  0:00                             ` Brian Rogoff
2000-04-20  0:00                         ` Robert Dewar
2000-04-20  0:00                           ` Ray Blaak [this message]
2000-04-20  0:00                             ` Charles Hixson
2000-04-21  0:00                               ` Jean-Pierre Rosen
2000-04-29  0:00                                 ` Aidan Skinner
2000-04-29  0:00                                   ` Robert I. Eachus
2000-04-21  0:00                               ` Jon S Anthony
2000-04-20  0:00                       ` Robert Dewar
2000-04-20  0:00                         ` Jeff Carter
2000-04-21  0:00                           ` Robert Dewar
2000-04-21  0:00                             ` Ken Garlington
2000-04-21  0:00                             ` Jon S Anthony
2000-04-22  0:00                               ` Robert Dewar
2000-04-19  0:00                   ` Bill Greene
2000-04-19  0:00               ` Robert Dewar
2000-04-18  0:00         ` David Botton
2000-04-16  0:00     ` Jeff Carter
2000-04-16  0:00       ` David Botton
2000-04-17  0:00         ` Robert Dewar
2000-04-17  0:00           ` Hyman Rosen
2000-04-17  0:00             ` Robert Dewar
2000-04-17  0:00     ` Robert I. Eachus
2000-04-18  0:00       ` Robert Dewar
2000-04-19  0:00         ` Robert I. Eachus
2000-04-20  0:00           ` Robert Dewar
2000-04-20  0:00             ` Ray Blaak
2000-04-23  0:00             ` Robert I. Eachus
2000-04-19  0:00     ` Alfred Hilscher
2000-04-19  0:00       ` Ray Blaak
2000-04-19  0:00         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox