comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Eiffel and Java
Date: 1996/11/14
Date: 1996-11-14T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Nov13200912@alexandria> (raw)
In-Reply-To: E0qMJC.EJt@syd.csa.com.au


In article <E0qMJC.EJt@syd.csa.com.au> donh@syd.csa.com.au (Don Harrison) writes:

> Marcos F. F. de Macedo writes:
> 
> :Jon S Anthony wrote:
> :
> :> Right.  As was pointed out back in that old thread, to get at the
> :> "separate" spec/impl aspects in Eiffel you would use an "abstract
> :> class" technique.  This doesn't quite work, but it is at least the
> :> proper analogue.
> 
> Jon, don't know why you say this. I have some vague recollection of you
> talking about Sather's separate interface and implementation *inheritance*.
> But Ada doesn't even support that, so I'm not sure what you're thinking
> of. Please explain why you make this association.

Don, what on Earth are you talking about?

First, we are speaking of interface/impl _separation_.  This was
discussed to death in the Real OO thread.  There are several reasons
why a) the "abstract class" trick in Eiffel is the correct analogue
and b) it doesn't quite work.  In fact, you _agreed_ with this!  See
below...

Second, where do you get the idea that Ada doesn't support separation
of interface and implementation inheritance????  Of course it does.
This is _another_ thing that was pointed out several times in several
ways by several people.  The implementation of a types interface can
be done completely separately from any aspects it might inherit or not
from its parent type.  It may in fact not use _any_ of its parent's
operations in this implementation.  You may also have a case where you
have the interface inherit some of the parent's implementation while
defining new operations which will be implemented using other parts of
the parent's implementation which are not part of the interface.


> :There is no need to write the interface if it could be stracted from the
> :source code. I should know that Ada was based on Modula-2 that used this
> :way of separating. Oberon, the sucessor of Modula-2, uses automatic
> :interface generating tool.
> 
> I'm with you on this. Your point was raised in the "Real OO" thread Jon 
> refers to. 

Correct and I recall that it became pretty clear to all what the
issues were and why the two approaches (not separating and using a
"short tool/form" and separating as in Ada...) were substantially
different.  For an example of the discussion, see below...


> This is how I would 'match' these facilities in Ada and Eiffel:
> 
> Ada                                   Eiffel
> ---                                   ------
> package interface                     (output of short tool)

Nope...  The output of the short tool does not get fed to an Eiffel
compiler and in no way is a language entity.  You can't give a "short
form" several different implementations, etc.

> package body                          class

Nope.  As you by now know, an Eiffel class is (more or less)
equivalent to a package exporting a tagged type interface.  Now, in
Ada, you can implement this type's interface in various ways -
including those where the



OK, I actually went back and found a couple of relevant articles:

---Partial article from me replying to mbk replying to someone...

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

Correct, M3 (and M2) for example provide this as well.


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

I don't know.  But it is not the same.  You still have the interface
of the so called "implementation" class which is inextricably hooked
to _its_ implementation.  The fact is that Meyer (for various reasons)
decided _against_ separation of interface and implementation.  So, if
you are going to argue about this, you should be arguing about whether
this choice was "a good idea" (and not pretending that it isn't true).



---Full article of donh reply to me...

Subject:      Re: Real OO (was Choice of OO primitives in Ada95)
From:         donh@syd.csa.com.au (Don Harrison)
Date:         1996/03/11
Message-Id:   <Do3FLw.50H@assip.csasyd.oz>
Sender:       news@assip.csasyd.oz
References:   <JSA.96Mar8143939@organon.com>
Organization: CSC Australia
Reply-To:     donh@syd.csa.com.au
Newsgroups:   comp.lang.ada,comp.lang.eiffel,comp.object

Jon S Anthony writes:

:In article <313F3415.F5A@venice.sedd.trw.com> "Matthew M. Lih" <lih@venice.sedd.trw.com> writes:
:
:> Another thing you can do in Ada is specify multiple implementations.
:> The common use of this is to have an implementation which returns
:> "dummy" results which people can use to test code which uses the
:> procedure. Meanwhile, the implementor can work on the actual
:> implementation. Is this possible in Eiffel?
:
:Sure, but it is either a) more complicated, b) more dodgy or c) both.
:If you play the "abstract class" game (and write protect the file,
:ugh!) you can sort of crib this as the "abstract class" is a kind of
:"poor mans" package specification.  Of course, you now have two
:interfaces to deal with: the "abstract one" and the
:"actual/implementation" one.

I agree. (That scared you, didn't it? :-)

:The other course is to have two
:implementations: the "fake" one and the "real" one.  You then must
:trust the implementor of the "real" one to not change the interface.

... or use tools to control it?

:/Jon
:-- 
:Jon Anthony
:Organon Motives, Inc.
:1 Williston Road, Suite 4
:Belmont, MA 02178
:
:617.484.3383
:jsa@organon.com

Don

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





  parent reply	other threads:[~1996-11-14  0:00 UTC|newest]

Thread overview: 168+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-27  0:00 Eiffel and Java Vincent WEBER
1996-10-27  0:00 ` Jean-Michel P. Decombe
1996-10-28  0:00   ` Robert Dewar
1996-10-31  0:00     ` Doug Marker
1996-10-28  0:00   ` David Hanley
1996-10-28  0:00     ` Matt Kennel
1996-10-28  0:00   ` Alexandre Oliva
1996-10-29  0:00   ` Chris Trimble
1996-10-31  0:00     ` Doug Marker
1996-10-31  0:00   ` David Bennett
1996-10-28  0:00 ` Larry Kilgallen
1996-10-30  0:00   ` Ronald Cole
1996-10-28  0:00 ` Matthew Heaney
1996-10-29  0:00   ` Vincent WEBER
1996-10-31  0:00     ` James McKim
1996-11-01  0:00       ` Matthew Heaney
1996-11-04  0:00         ` James McKim
1996-10-30  0:00   ` Don Harrison
1996-10-31  0:00     ` James McKim
1996-11-04  0:00       ` Don Harrison
1996-11-23  0:00       ` Van Snyder
1996-10-30  0:00   ` Jon S Anthony
1996-11-01  0:00     ` Eiffel and Java + Ada dispatching Jean-Marc Jezequel
1996-10-31  0:00   ` Eiffel and Java Joachim Durchholz
1996-11-01  0:00   ` Norman H. Cohen
1996-11-02  0:00   ` Jon S Anthony
1996-11-02  0:00   ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-03  0:00   ` Eiffel and Java Joachim Durchholz
1996-11-05  0:00   ` Norman H. Cohen
1996-10-29  0:00 ` Don Harrison
1996-10-29  0:00   ` Eiffel and Java + Ada dispatching Vincent WEBER
1996-10-30  0:00     ` Jean-Marc Jezequel
1996-11-01  0:00       ` Don Harrison
1996-11-01  0:00       ` Joachim Durchholz
1996-10-30  0:00     ` Don Harrison
1996-10-30  0:00       ` Jon S Anthony
1996-10-29  0:00   ` Eiffel and Java Fergus Henderson
1996-10-30  0:00     ` Don Harrison
1996-10-30  0:00       ` Fergus Henderson
1996-10-31  0:00     ` David L. Shang
1996-11-01  0:00       ` Matt Kennel
1996-11-04  0:00         ` David L. Shang
1996-11-05  0:00           ` Matt Kennel
1996-11-06  0:00             ` David L. Shang
1996-11-04  0:00       ` Robert I. Eachus
1996-11-01  0:00     ` Jon S Anthony
1996-11-02  0:00       ` Fergus Henderson
1996-11-04  0:00       ` David L. Shang
1996-11-05  0:00         ` Jon S Anthony
1996-11-02  0:00     ` Darko BUDOR
1996-11-02  0:00       ` Fergus Henderson
1996-11-03  0:00         ` Darko BUDOR
1996-11-03  0:00         ` Matt Kennel
1996-11-03  0:00     ` Jon S Anthony
1996-11-03  0:00     ` Matthias Ernst
1996-11-05  0:00     ` Jon S Anthony
1996-11-10  0:00     ` Marcos F. F. de Macedo
1996-11-11  0:00       ` David L. Shang
1996-11-12  0:00         ` Fergus Henderson
1996-11-12  0:00           ` David L. Shang
1996-11-12  0:00             ` David L. Shang
1996-11-16  0:00             ` Fergus Henderson
1996-11-18  0:00               ` David L. Shang
1996-11-18  0:00             ` Kai Quale
1996-11-18  0:00               ` David L. Shang
1996-11-25  0:00                 ` Kai Quale
1996-11-15  0:00         ` Paul Johnson
1996-11-12  0:00       ` Alexander Asteroth
1996-11-11  0:00         ` Marcos F. F. de Macedo
1996-11-12  0:00         ` Matt Kennel
1996-11-12  0:00         ` Benedict A. Gomes
1996-10-30  0:00   ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-04  0:00     ` Don Harrison
1996-11-04  0:00       ` C to Ada Ali Mirhosseini
1996-11-04  0:00         ` Matthew Daniel
1996-11-04  0:00         ` Robert Dewar
1996-11-05  0:00       ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-05  0:00         ` Don Harrison
1996-11-06  0:00           ` Jon S Anthony
1996-10-30  0:00   ` Eiffel and Java David Petrie Stoutamire
1996-10-30  0:00   ` Eiffel and Java + Ada dispatching Robert I. Eachus
1996-10-31  0:00   ` Joachim Durchholz
1996-10-31  0:00   ` Jon S Anthony
     [not found]     ` <E06F2B.Az7@syd.csa.com.au>
1996-11-01  0:00       ` Jon S Anthony
1996-11-04  0:00         ` Don Harrison
1996-11-05  0:00           ` Jon S Anthony
1996-11-02  0:00       ` Robert Dewar
1996-11-04  0:00         ` Norman H. Cohen
1996-11-05  0:00         ` Don Harrison
1996-11-05  0:00           ` Robb Nebbe
1996-11-06  0:00             ` To overload or not to overload (was Eiffel and Java + Ada dispatching) Don Harrison
1996-11-06  0:00               ` Robb Nebbe
1996-11-07  0:00                 ` Norman H. Cohen
1996-11-07  0:00                 ` Don Harrison
1996-11-07  0:00                   ` Jon S Anthony
1996-11-11  0:00                     ` Don Harrison
1996-11-07  0:00                   ` Jon S Anthony
1996-11-07  0:00                   ` Juergen Schlegelmilch
1996-11-08  0:00                     ` Don Harrison
1996-11-08  0:00                       ` Don Harrison
1996-11-14  0:00                         ` Jon S Anthony
1996-11-14  0:00                     ` Jon S Anthony
1996-11-08  0:00                   ` bill.williams
1996-11-11  0:00                     ` Don Harrison
1996-11-06  0:00             ` Eiffel and Java + Ada dispatching Jean-Marc Jezequel
1996-11-07  0:00               ` Robb Nebbe
1996-11-08  0:00             ` Robert I. Eachus
1996-11-05  0:00           ` Joachim Durchholz
1996-11-06  0:00           ` Robert I. Eachus
1996-11-08  0:00             ` Don Harrison
1996-11-08  0:00               ` Jon S Anthony
1996-11-08  0:00               ` Robert A Duff
1996-11-12  0:00                 ` Don Harrison
1996-11-12  0:00                   ` Joachim Durchholz
1996-11-15  0:00                     ` Richard Riehle
1996-11-16  0:00                     ` Interfacing contracts (Was: Eiffel and Java + Ada dispatching) Geert Bosch
1996-11-17  0:00                       ` Robert A Duff
1996-11-12  0:00                   ` Eiffel and Java + Ada dispatching Robert A Duff
1996-11-13  0:00                     ` Don Harrison
1996-11-13  0:00                       ` Robert A Duff
1996-11-14  0:00                         ` Don Harrison
1996-11-13  0:00                       ` Jon S Anthony
1996-11-15  0:00                         ` Don Harrison
1996-11-19  0:00                           ` Jon S Anthony
1996-11-20  0:00                             ` Don Harrison
1996-11-14  0:00               ` Robert I. Eachus
1996-11-14  0:00                 ` Robert A Duff
1996-11-15  0:00                 ` Don Harrison
1996-11-15  0:00                   ` Robert I. Eachus
1996-11-19  0:00                     ` Don Harrison
1996-11-18  0:00                       ` Vincent Celier
1996-11-22  0:00                         ` Don Harrison
1996-11-19  0:00                 ` Jon S Anthony
1996-11-15  0:00               ` portmanteau (was Re: Eiffel and Java + Ada dispatching) Robert I. Eachus
1996-11-07  0:00           ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-07  0:00           ` Robb Nebbe
1996-11-12  0:00           ` Jon S Anthony
1996-11-01  0:00     ` Jean-Marc Jezequel
1996-11-01  0:00   ` Eiffel and Java Matthias Ernst
1996-11-01  0:00     ` William Clodius
1996-11-01  0:00     ` Benedict A. Gomes
1996-11-02  0:00   ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-02  0:00   ` Jon S Anthony
1996-11-04  0:00   ` Eiffel and Java Robert I. Eachus
1996-10-30  0:00 ` Jon S Anthony
1996-11-01  0:00   ` Don Harrison
1996-11-01  0:00     ` Jon S Anthony
1996-11-07  0:00       ` Marcos F. F. de Macedo
1996-11-11  0:00         ` Ian Joyner
1996-11-12  0:00         ` Don Harrison
1996-11-13  0:00           ` Norman H. Cohen
1996-11-15  0:00             ` Don Harrison
1996-11-14  0:00           ` Jon S Anthony [this message]
1996-11-15  0:00             ` Don Harrison
1996-11-19  0:00               ` Jon S Anthony
1996-11-21  0:00                 ` Don Harrison
1996-11-12  0:00     ` Jon S Anthony
1996-10-31  0:00 ` Joachim Durchholz
1996-11-01  0:00 ` Jon S Anthony
1996-11-02  0:00 ` Jon S Anthony
1996-11-03  0:00 ` Eiffel and Java + Ada dispatching Joachim Durchholz
1996-11-04  0:00 ` Eiffel and Java Richard A. O'Keefe
  -- strict thread matches above, loose matches on Subject: below --
1996-10-28  0:00 cosc19z5@bayou.uh.edu
     [not found] ` <01bbc7f6$b1c0b7a0$LocalHost@gaijin>
1996-11-01  0:00   ` Alan Lovejoy
1996-11-01  0:00     ` Chris
1996-11-01  0:00   ` Ranjan Bagchi
1996-11-02  0:00 Ell
1996-11-02  0:00 ` traymond
replies disabled

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