I think you're misreading... there are literally two distinct solutions for x in that example, regardless of whether you normalize (plus potentially others). This could work if type intersections formed a free monoid, but it's not free...
-
-
Replying to @propensive @guizmaii
We can use the same example with set intersection: x ∩ B = A ∩ B Yes, x could be both A or (A ∩ B) or (A ∩ A ∩ B ∩ B ∩ B), that doesn't mean that (A ∩ B) \ B = A. It is NOT subtraction, but difference or negation. I.e. the difference between a Group and a Boolean algebra
1 reply 0 retweets 1 like -
Replying to @LukaJacobowitz @guizmaii
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 ?
1 reply 0 retweets 0 likes -
Replying to @propensive @guizmaii
I think that would just be Some[Int] \ Product (maybe the scala compiler can prove this is Nothing, but it's not a deal breaker either way)
1 reply 0 retweets 0 likes -
-
Some[Int] is a Product, so if you forbid Product then nothing can satisfy Some[Int] right?
2 replies 0 retweets 1 like -
Replying to @d6 @propensive and
(maybe i'm misunderstanding the semantics of \ here)
1 reply 0 retweets 0 likes -
Nothing is the GLB of everything, so if you remove everything from the intersection, you're left with Any.
2 replies 0 retweets 0 likes -
I don't think I agree `A \ A = Nothing`
1 reply 0 retweets 1 like -
Replying to @LukaJacobowitz @propensive and
Put another way: A | ~A =:= Any A & ~A =:= Nothing Where ~A =:= Any \ A
1 reply 0 retweets 1 like
I don't think we can do this in Scala's type system. I still don't have a grasp of what semantics \ should have. The whole concept doesn't seem to make sense to me in the context of subtyping... I'm going to go and think about it some more, though.
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.