From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Eiffel and Java
Date: 1996/11/16
Date: 1996-11-16T00:00:00+00:00 [thread overview]
Message-ID: <56j7up$h1n@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: 1996Nov12.143451.16691@schbbs.mot.com
shang@corp.mot.com (David L. Shang) writes:
>fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) writes:
>> shang@corp.mot.com (David L. Shang) writes:
>> > But separation subtype from subclass is not [good].
>>
>> Why not? Doesn't this also serve to "reduce the dependency
>> among software components"?
>
>No, the separation subtype from subclass does not help
>dependency reduction. Let "A" be a parent class, and "B" be
>a subclass but not a subtype. "C" cannot use "B" unless it is
>dependent on "B", because depending on "A" does not provide
>any polymorphism that can guide the implementation to "B".
In this situation, a Sather programmer would make an interface $A
that was a supertype of B, and then C could use B via the $A interface.
interface $A > B is ... end;
class C < $A is
private include B;
...
end;
If you want the compiler to make sure that C does not depend on B,
you can encapsulate the dependency on B as follows:
class C_A < $A is private include B end;
class C < $A is
private include C_A;
...
end;
Later another programmer could change things so
that C used any other class B2 < $A instead of B,
just by changing the one-line definition of C_A.
This seems much better than languages such as C++ or Eiffel which don't
separate subtype and subclass inheritence, where a programmer would
probably make C access B via A rather than $A. If A is not an abstract
interface, this makes it difficult to change the program to use a
different implementation.
So I think separating subtype from subclass does serve to
reduce the dependency among software components.
>> ]In Sather, implementation classes are not always subtype of the
>> ]parent class. They merely reuse the code (inherite the implementation)
>> ]defined in their parent, but not necessarily be subtype of it.
>> ]Without subtyping, the interface provided in the parent cannot
>> ]serve as a polymorphic interface for all the implementations.
>>
>> Yes, and that's a good thing, isn't it?
>> It decouples the interface and the implementation,
>> making it easier to use a different implementation.
>>
>As I stated above, it does not make it easier to use a different
>implementation,
I think it does. Requiring people to use only abstract interfaces
for polymorphism does make it easier to use different implementations.
>rather, it makes it easier to create a
>different implementation that is not a subtype, or that
>violates the parent's regulation.
If you said "as well" rather than "rather", then I might agree with you.
But I'm not yet convinced that creating a different implementation that is
not a subtype is necessarily a bad thing, in a language which separates
subtyping and subclassing.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
next prev parent reply other threads:[~1996-11-16 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 ` David Hanley
1996-10-28 0:00 ` Matt Kennel
1996-10-28 0:00 ` Alexandre Oliva
1996-10-28 0:00 ` Robert Dewar
1996-10-31 0:00 ` Doug Marker
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 ` Jon S Anthony
1996-11-01 0:00 ` Eiffel and Java + Ada dispatching Jean-Marc Jezequel
1996-10-30 0:00 ` Eiffel and Java 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-31 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Norman H. Cohen
1996-11-02 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-02 0:00 ` Eiffel and Java Jon S Anthony
1996-11-03 0:00 ` 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 ` Don Harrison
1996-10-30 0:00 ` Jon S Anthony
1996-10-30 0:00 ` Jean-Marc Jezequel
1996-11-01 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Don Harrison
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 ` Matt Kennel
1996-11-03 0:00 ` Darko BUDOR
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 [this message]
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
1996-11-01 0:00 ` Jean-Marc Jezequel
[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 ` Joachim Durchholz
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 ` Don Harrison
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-07 0:00 ` Jon S Anthony
1996-11-07 0:00 ` Jon S Anthony
1996-11-11 0:00 ` Don Harrison
1996-11-08 0:00 ` bill.williams
1996-11-11 0:00 ` Don Harrison
1996-11-07 0:00 ` Norman H. Cohen
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-06 0:00 ` Robert I. Eachus
1996-11-08 0:00 ` Don Harrison
1996-11-08 0:00 ` Robert A Duff
1996-11-12 0:00 ` Don Harrison
1996-11-12 0:00 ` 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-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-08 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
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 Robb Nebbe
1996-11-07 0:00 ` Jon S Anthony
1996-11-12 0:00 ` Jon S Anthony
1996-11-01 0:00 ` Eiffel and Java Matthias Ernst
1996-11-01 0:00 ` Benedict A. Gomes
1996-11-01 0:00 ` William Clodius
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
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