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: <8420mi$hnp$1@nnrp1.deja.com> (raw)
In-Reply-To: 83tb9t$g8e$1@nnrp1.deja.com

In article <83tb9t$g8e$1@nnrp1.deja.com>,
  Ted Dennison <dennison@telepath.com> wrote:
> In article <83sqht$5oi$1@nnrp1.deja.com>,
>   Ehud Lamm <mslamm@mscc.huji.ac.il> wrote:
> > In article <83qtap$pri$1@nnrp1.deja.com>,
> >   Ted Dennison <dennison@telepath.com> wrote:
> > > if d not in truck_driver'class then
> > >    raise Constraint_Error;
> > > end if;
> > >
> >
> > Right. But than we are dealing with a runtime check. See the
> > discussion per Tucker's post.
>
> Well...yes. But even if the language directly supported MI, this would
> have to be a runtime check in many situations. Situations where it
> doesn't dynamicly dispatch might be determinable at compile time, but
in
> those situations you don't need straight inheritance either.

I am not sure why you restrict the issue to MI. The hierarchy of
vehicles and drivers was SI. The difference is that you have covariance
on paramters that are not of the class being extended. Note that this
is clearly apperant - becuase of the "distinguished receiver."

>
> The real drawback in my mind is that the type constraint isn't visible
> in the procedure's spec. You'd have to copiously comment it, but
> comments aren't checked by the compiler.

Quite. This is an important issue, and relates to expresability.
--
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 ` 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
1999-12-22  0:00 ` Ted Dennison
1999-12-23  0:00   ` Ehud Lamm
1999-12-23  0:00     ` Robert A Duff
1999-12-25  0:00       ` Ehud Lamm
1999-12-23  0:00     ` Ted Dennison
1999-12-25  0:00       ` Ehud Lamm [this message]
1999-12-22  0:00 ` Jeff Carter
replies disabled

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