HaloO,
Trey Harris wrote:
In other words, I agree that it's fuzzy, but I personally read the
fuziness as intentional, so as to allow implementations flexibility and
prevent bad dependencies on particular "inner workings" of the type system.
Thanks for the support. I figured that I've asked the same question more
than a year ago. I want to summarize what we have so far.
1) In type constraint position we can say things like A|B to effectively
mean a supertype of A and B by virtue of $_ ~~ A || $_ ~~ B.
2) We have A&B and the A B juxtaposition to mean $_ ~~ A && $_ ~~ B
which is an intersection (sub)type of A and B.
3) The junctive ops |, & and ^ can be used in where clauses to form
type constraints. How does that apply to any(), all(), one() and
none()? Are they allowed as well? With none() we effectively get
type complement.
4) The junctive ops and the set operators (|) and (&) are *not* yet
available as type constructors in role definitions, that is things
like 'role does A(&)B'. To comply with 2) this should create an
intersection type even though it joins the interfaces of A and B.
Does recursive use of roles in their own definition produce F-bounds?
role A does Gen[A] {...}
or perhaps
role A where A.does(Gen[A]) {...}
Regards, TSa.
--