comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: OO puzzle
Date: 1999/12/23
Date: 1999-12-23T00:00:00+00:00	[thread overview]
Message-ID: <83tb9t$g8e$1@nnrp1.deja.com> (raw)
In-Reply-To: 83sqht$5oi$1@nnrp1.deja.com

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.

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.

--
T.E.D.


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




  reply	other threads:[~1999-12-23  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     ` Ted Dennison [this message]
1999-12-25  0:00       ` Ehud Lamm
1999-12-23  0:00     ` Robert A Duff
1999-12-25  0:00       ` Ehud Lamm
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