comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: OO puzzle
Date: 1999/12/31
Date: 1999-12-31T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.9912310836350.27642-100000@shell5.ba.best.com> (raw)
In-Reply-To: 386C07D7.A24A36F5@shadow.net

On Thu, 30 Dec 1999, Jeffrey L Straszheim wrote:
> Brian Rogoff wrote:
>  
> > Parameter covariance seemed like a huge mistake of the Eiffel design to
> > me. Is it all fixed and working now?
> 
> I have mixed feelings. I've used covariance, and it turns out that I
> found it generally useful, even while the holes in the type system
> bothered me on a basic level. 

Kind of like "conservative" (inaccurate) garbage collectors. You know its 
wrong even though it seems to work most of the time.

I preferred Sather's approach, though I admit contravariance isn't
"useful" there were acceptable workarounds for covariance. 

> At a certain abstract level, Ada has a similar issue, in that I can
> declare a subtype and, as it turns out, have no formal guarantee that
> I won't violate its constraint. In both situations one could make
> the effort to prove that a violation will not occur, but in neither
> case does the language formally guarantee it.

This is really not the same, as Ada subtypes aren't like Eiffel
subclasses. Its more appropriate to compare Ada subtypes with 
array bounds checking and the like. 

It is interesting that in lots of modern languages with sophisticated type 
systems the type checking is very hard, sometimes even undecidable. C++ 
with its templates come to mind, but OCaml's module system also has such 
problems.  

-- Brian






  reply	other threads:[~1999-12-31  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 ` 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 [this message]
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
replies disabled

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