On 8/10/05, TSa <[EMAIL PROTECTED]> wrote: > HaloO, > > Luke Palmer wrote: > > On 8/9/05, Larry Wall <[EMAIL PROTECTED]> wrote: > > > >>So why not just use "describes"? Then maybe Object.isa(Foo) delegates > >>to $obj.meta.describes(Foo). > > > > > > Hmm. We have a similar problem with the new class-set notation. > > These two things: > > Did I miss something? What is the class-set notation?
A new development in perl 6 land that will make some folks very happy. There is now a Set role. Among its operations are (including parentheses): (+) Union (*) Intersection (-) Difference (<=) Subset (<) Proper subset (>=) Superset (>) Proper superset (in) Element (=) Set equality I believe the unicode variants are also allowed. And now we're doing away with junctive types in favor of set types. This was mostly because: (A|B) (<=) A Expands to A (<=) A || B (<=) A Which is true. Such a type can not exist, lest every type be equal to every other type. So now Type does Set, so we have: A (+) B # type representing a value that is either A or B A (*) B # type representing a value that is both A and B A (-) B # type representing a value that is A but not B etc. So types are merely sets of (hypothetical, eventual) instances, together with a few operations to make introspection etc. easier. You might even get Piers's all-instance introspection by Foo.elements. That's not a guarantee though. > > $a.does(Foo); > > Bar.does(Foo); > > > > Mean two different things: > > Really? Yep: $a.does(Foo) $a (in) Foo Bar.does(Foo) Bar (<=) Foo Assuming that $a is not a type. If there is any extra structure beyond set structure that we need in a type lattice, I think it's your job to tell us what that is. Luke