Jrgen Hermanrud Fjeld wrote:
>>>On Thu, 2005-02-10 at 09:44 +0100, Jrgen Hermanrud Fjeld wrote:
>>>
>>>>I would like to know if inheritance in BitC implies overloading, as
>
> I meant subtyping and not overloading here ^^^^^^^^^^^
>
He is right. I expressed skepticism about the soundness of sub-typing
yesterday afternoon, but could not recall the actual case.
Let me illustrate the example by Cook, Hill and Canning:
If the base class has type:
t1 = mu t. {eq: t->bool} // binary operator that compares
another object to self
and the inhetited class has type:
t2 = mu t. {eq: t -> bool ; abc: someotherthing} // In t ->bool, t HAS
to be the child type
Obviously, t2 not <: t1 (because of the t in function argument position).
Many thanks to Jrgen Hermanrud Fjeld for all the references.
Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev