A set of types F[T₁], …, F[Tᵢ], …, F[Tₙ], where F's parameter is invariant, has an universal (∀) upper bound of F[T] for some choice of T where LUB(Tᵢ) <: T <: GLB(Tᵢ) if it exists, and an existential (∃) upper bound of F[T] for some T where GLB(Tᵢ) <: T <: LUB(Tᵢ).
-
Show this thread
-
The universal solution will only exist if all the Tᵢ are identical, otherwise we will find that, without loss of generality, GLB(Tᵢ) <: LUB(Tᵢ), which has no solutions. And this is where we must resort to using an existential type.
1 reply 0 retweets 1 likeShow this thread
I find it beautiful that a solution exists in the dual, existential world, when it doesn't exist in the universal world, and that solution is found by calculating the type bounds using categorical duals of the algorithms for the (nonexistent) universal solution.
11:46 AM - 16 Dec 2019
0 replies
0 retweets
2 likes
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.