Broken contract programing
via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 14 00:43:43 PDT 2015
On Wednesday, 13 May 2015 at 23:49:51 UTC, Idan Arye wrote:
> That a type system can solve this problem if it supports
> covariant and contravariant generic/template parameters.
Not if someone else provided the super class, and generics simply
bypasses the OO-inheritance model. Anyway, the key point was that
uses of type systems that are workable (not overly tedious) can
only catch the most obvious bugs at compile time. Therefore it is
useful to be able to constrain invariants to a point where they
ensure correctness, not type-soundness.
More information about the Digitalmars-d
mailing list