Additional keywords and phrases:
exceptions, type calculi,
parametric types, coercion, ad hoc polymorphism,
universal types, existential types,
unfolding, intersection types
Incremental system evolution is in practice non-monotonic!
Example:
Independent attributes: M disjoint from P
Overlapping attributes: M overrules P
Proof: take and , then
public:
virtual T value() = 0;
};
class Int : public A<int> { //
, \zline{(contravariance)}
where and
Simple typing --
Delayed --
We have \zline{(more information)}
where
where
However \zline{(subtyping error)}
F-bounded constraint \n
Object instantiation:
for \n
We have because
with recursive types
Valid, because
However
int b;
public:
C() { ... }
bool eq(C& other) { return other.i == i && other.b == b; }
bool eq(P& other) { return other.i == i; }
};
2
3
4
5
6
As further reading I recommend