comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@EMAIL.ENST.FR>
Subject: Re: Real OO (was Choice of OO primitives in Ada95)
Date: 1996/02/22
Date: 1996-02-22T00:00:00+00:00	[thread overview]
Message-ID: <199602221711.SAA18350@email.enst.fr> (raw)

At 03:17 22/02/1996 GMT, Don Harrison wrote:
This time I can't  resist responding.... Here we go:

>The real issue to me is that the Ada 95 OO model falls short of what real
>object-
>orientation is about. The purpose of OO, as I see it is this:
>
>"To enable the cost-effective development of correct, reliable and maintainable
> software".
Agreed.

>The sub-goals required to facilitate this are:
>a) Allow decomposition of the software into intelligible modules each of which
>   represents a clearly defined abstraction and has a clearly defined interface
>   with other abstractions
>
>b) Allow the construction, where possible, of abstractions using abstractions
>   that are already defined, customising them as necessary rather than
>   defining abstractions from sctrach.
>
>c) Allow the valid state of an abstraction to be clearly defined and enforced.
Are you sure these are the best sub-goals ? That there are no other ones ?
And that in  stating the goals, you were not influenced by the conclusion
you wanted to draw ? But let's go with it for the moment.

>In order to acheive those goals optimally, an OO language should offer:
>
>1) encapsulated abstractions (classes)
OK, but of course you mean that there must be a clear separation, at
language level, between specification and implementation

>2) inheritance/polymorphism of those abstractions
How  can you deduce this from b) ? Inheritance is definitely one possible
way, but you are claiming here it is the only one. I think building an
abstraction by putting together standardized, appropriate building blocks
and lower level abstractions is another way of achieving b) that does not
require inheritance.
Both approaches have benefits and drawbacks. I'm just irritated each time I
see that because inheritance is one way of solving a problem, people think
it is the only one.

>3) control over the state of those abstractions (assertions).
I think a typing system that does not allow  adding a length to a velocity
is much more important for c) than assertions that are nothing more that a
user definable function call.
>
>Taking each in turn (and not attempting to justify them),
>
>1) Best provided by pure OO (eg. Eiffel, Smalltalk) followed by hybrid OO
>   language with proper classes (extendable types mapped onto modules)
>   eg. (C++, myriad others) followed by hybrid OO with non-encapsulated classes
>   (eg. Ada, CLOS?).
Of course, I do not agree. For example, the presence of ONCE functions in
Eiffel is a kludge to overcome the absence of package initialization that is
nicely provided by Ada. And as for separating specs and implementations, Ada
is the only language that does it nicely, without giving up safety.
>
>2) The linchpin of OO - any language claiming to be OO offers this.
Including Ada 95, although I still think it has been overadvocated.
>
>3) The only significant OO language I know of that offers this is Eiffel.
>   Assertions are executable conditions which must be satisfied to guarantee
>   that an abstraction has a valid state whenever it is updated. These include:
> [...]
It was considered in the early stages of Ada  (83) design, and rejected.
Note also that assertions in Eiffel are much LESS reliable than one could
think, since assertions are disabled while evaluation the condition for an
assertion. This is necessary to prevent semantic dependencies to end up in
infinite recursion, but limits the trust you can have in assertions.

>
>Note that Ada only fully satisfies 2) and has a sub-optimal mechanism for 1).
I have a package for 3) if you want. It's less than 50 lines long, including
comments.

So what ? Your statements were biased towards the conclusion that Eiffel was
the only appropriate language. I can  come up with equally biased statements
that will "naturally" conclude that Ada is the best OOP language. What
about, for example:

   OOP is about modelling real-world objects. Since real-world objects evolve
   concurrently, no language should be called OO unless it provides concurrency.

OK, this kills C++, Smalltalk, Eiffel, CLOS....
+------------------------------------o-------------------------------------+
| P-mail:                            | E-mail: rosen@enst.fr               |
|   ADALOG - 27 avenue de Verdun     |    Tel: +33 1 46 45 51 12           |
|   92170 Vanves - FRANCE            |    Fax: +33 1 46 45 52 49           |
+------------------------------------o-------------------------------------+




             reply	other threads:[~1996-02-22  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-22  0:00 Jean-Pierre Rosen [this message]
1996-02-22  0:00 ` Real OO (was Choice of OO primitives in Ada95) Valery Croizier
1996-02-24  0:00   ` Robert A Duff
1996-02-22  0:00 ` Matt Kennel
1996-02-23  0:00   ` Robert A Duff
1996-02-22  0:00 ` Spencer Allain
1996-02-23  0:00 ` Jon S Anthony
     [not found] <Do7unJ.1sq@world.std.com>
1996-03-15  0:00 ` Don Harrison
     [not found] <Do7uyC.4K2@world.std.com>
1996-03-15  0:00 ` Don Harrison
  -- strict thread matches above, loose matches on Subject: below --
1996-02-20  0:00 Choice of OO primitives in Ada95 Jon S Anthony
1996-02-22  0:00 ` Real OO (was Choice of OO primitives in Ada95) Don Harrison
1996-02-22  0:00   ` Jon S Anthony
1996-02-22  0:00   ` Robert Dewar
1996-02-23  0:00     ` Gene Ouye
1996-02-26  0:00       ` James O'Connor
1996-02-26  0:00         ` Gene Ouye
1996-02-24  0:00   ` Valery Croizier
1996-02-24  0:00   ` Robert A Duff
1996-02-26  0:00     ` Don Harrison
1996-02-26  0:00     ` Matthew B. Kennel
replies disabled

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