comp.lang.ada
 help / color / mirror / Atom feed
From: kennel@msr.epm.ornl.gov (Matt Kennel)
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: <4git9e$cqi@stc06.ctd.ornl.gov> (raw)
In-Reply-To: 199602221711.SAA18350@email.enst.fr

Jean-Pierre Rosen (rosen@EMAIL.ENST.FR) wrote:
> >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.

Um maaaaybe, but 'once functions' do what they do with no fuss and with
very clear semantics, without having to define an "elaboration" notion for
packages. 

I'm not sure that's a "kludge" compared to the complexity of package
initialization in Ada. 

>  And as for separating specs and implementations, Ada
> is the only language that does it nicely, without giving up safety.

This isn't true.

You write abstract classes in Eiffel/Sather/C++ which has the spec
(including pre/post/invariant) and write an implementation class which
supports it. 

What is the problem?

> >
> >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.

No.  Meyer figured out, quite successfully IMHO, exactly the kinds of
rules that you need to turn "assertions" from just 'check this predicate
and bomb if false' into a powerful *human* protocol "programming by
contract". 

These special rules are exactly what you need so you CAN trust assertions,
because it means that you can put in truly useful checks that don't barf
because of stupidities like the above. 

> >
> >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....

     OOP is about modelling real-world objects. Since real world objects couple
     to the Einstein mass-energy tensor, no langauge should be called OO unless
     its operation can provide sufficient extra energy dissipation to cause 
     similar effects.

:-) 


I think it *is* quite fair to say that Eiffel is more object-oriented---ok
more oriented-around-objects than Ada 95: it's the idee' fixe for Eiffel. 

This doesn't prove 'prima facie' superiority, though I tend to like
Eiffel better.  (I've never been convinced about kludges to handle the 
'multiple withing' problem).


> +------------------------------------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-------------------------------------+




  parent 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 Real OO (was Choice of OO primitives in Ada95) Jean-Pierre Rosen
1996-02-22  0:00 ` Spencer Allain
1996-02-22  0:00 ` Matt Kennel [this message]
1996-02-23  0:00   ` Robert A Duff
1996-02-22  0:00 ` Valery Croizier
1996-02-24  0:00   ` Robert A Duff
1996-02-23  0:00 ` Jon S Anthony
     [not found] <Do7uyC.4K2@world.std.com>
1996-03-15  0:00 ` Don Harrison
     [not found] <Do7unJ.1sq@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   ` 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-22  0:00   ` Jon S Anthony
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