comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: OO puzzle
Date: 1999/12/25
Date: 1999-12-25T00:00:00+00:00	[thread overview]
Message-ID: <84216l$i2i$1@nnrp1.deja.com> (raw)
In-Reply-To: wccr9gdaefw.fsf@world.std.com

In article <wccr9gdaefw.fsf@world.std.com>,
  Robert A Duff <bobduff@world.std.com> wrote:
> Ehud Lamm <mslamm@mscc.huji.ac.il> writes:
>
> > But than you lose the ability to define the abstract interface (for
> > Motor_Vehicle) and know that it is supported by all descendants.
>
> But it seems to me that you are *not* requiring the descendants to
> support that interface.  You are trying to let the descendants
support a
> different operation, also called "register", but with a different
> contract (ie, trucks can't register airplane drivers, although the
> parent type implied they could -- or whatever the example was).
>

Yep. In essence it is like saying that suporting a covariant interface
is still an IS-A relationship.

I am not sure if I am comfortable with this notion, but it does have an
impact on design.

> It's an interesting language design issue, anyway.
>

I'll add one more quote from the Eiffel book:
"The above two properties (P1 and P2) often seem surprising at first.
Why make type checking more difficult, and introduce the distinction
between class-level and system-level validity by allowing classes to
choose export and  argument typing policies different from those of its
parents?
The answer is the this felxibilty is indispensable to the practice of
object-oriented design. without it designer would constantly have to
reshuffle inheritance hierarchies, and would have much difficulty
observing the constraints of a typed object-oriented language. P1 and
P2 serve to acknowledge the inescapable difficulty of reconciling the
golas of orderly classifiaction (as implemented through inheritance)
and safety (as implemented through typing) with the irruglarities and
instability of the real-world situtations which our software systems
attempt to model through their inheritance hierarchies."

The is the view of the designer of Eiffel.

----
Ehud Lamm mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm
Check it out and subscribe to the E-List


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-12-25  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-22  0:00 OO puzzle Ehud Lamm
1999-12-22  0:00 ` Ted Dennison
1999-12-23  0:00   ` Ehud Lamm
1999-12-23  0:00     ` Ted Dennison
1999-12-25  0:00       ` Ehud Lamm
1999-12-23  0:00     ` Robert A Duff
1999-12-25  0:00       ` Ehud Lamm [this message]
1999-12-22  0:00 ` Jeff Carter
1999-12-22  0:00 ` Tucker Taft
1999-12-23  0:00   ` Ehud Lamm
1999-12-23  0:00     ` Robert Dewar
1999-12-23  0:00       ` Ehud Lamm
1999-12-24  0:00         ` swhalen
1999-12-25  0:00           ` Ehud Lamm
1999-12-25  0:00         ` Ehud Lamm
1999-12-29  0:00     ` Brian Rogoff
1999-12-30  0:00       ` Jeffrey L Straszheim
1999-12-31  0:00         ` Brian Rogoff
1999-12-31  0:00           ` Jeffrey L Straszheim
2000-01-02  0:00             ` Brian Rogoff
2000-01-03  0:00             ` Matthew Heaney
replies disabled

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