Ok, but what should (A ∩ B) \ B give if A = C ∩ B? A might be abstract. Here's a concrete example with types. What is, (Some[Int] with Product) \ Product ?
Now, you *could* use Nothing as the lower bound, but you would be losing type information when you don't need to, and it would allow you to have Orderings of any type in your List.
-
-
In general, when the compiler can't find a universal solution to a least upper-bound, it will infer an existential, bounded above by the LUB of the types, and bounded below by the GLB, which is the intersection type.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.
Can you name me one use case where `Int & String` would be a useful type and `Nothing` wouldn't do?