OH: "Subtyping's a bitch." I cannot reveal who said this.
I will watch the video... if there will be one? (I'll be the wrong side of the world then...)
-
-
e.g. The type of [3 "s"] can only be List(Union(Int,String)). Similarly the empty list, [], can only be List(Union()). But Union() is Empty, which is the bottom of the hierarchy. So [] is a List(Empty). Which is a subtype of any List type. So [] can be used in any List context.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
"These ColouredPoints are different but as Points they are equal" is plausible. "These Ints are not equal but as Rationals they are equal" is NOT plausible. "These Dogs are equal but as Mammals they are not equal" is NOT plausible. This is the test for correct subtyping. (1/2)
-
If it is even plausible for equality to change then it is not (my sort of) subtyping. Instead it is some sort of type-declaration-convenience hierarchy. At best it is a forgetful functor which might have a useful adjoint. (2/2)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.