> Unlike many object-oriented languages, generic classes in Nit yield a kind of sub-typing. For example, Pair[Int] is a subtype of Pair[Object].
Sounds completely broken. What if Pair[E] is contravariant on E?
class Pair[E]
fun contains(E): Bool
fun clamp(E): Bool
end
> http://nitlanguage.org/refinement/
(redefining any method)That's spooky action at a distance. It breaks modularity, could cause packaging hell.