Re: set operations for roles

2006-10-20 Thread TSa
HaloO, Jonathan Lang wrote: role R3 does A B { ... } R3.does(A) # false: R3 can't neccessarily do everything that A can. A.does(R3) # false: A can't neccessarily do everything that R3 can. That last one should be true. Role R3 contains the things that A and B have in common. Hence

Re: Interrogative statements

2006-10-20 Thread Juerd
Jonathan Lang skribis 2006-10-19 18:27 (-0700): Let's say that I want $expression?; to mean the same thing as the statement $_ = $expression; That is, any statement that ends with a '?;' instead of a ';' evaluates in scalar context instead of void context and stores the result

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: role R3 does A B { ... } R3.does(A) # false: R3 can't neccessarily do everything that A can. A.does(R3) # false: A can't neccessarily do everything that R3 can. That last one should be true. Role R3 contains the things that A and B have in common.

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, Jonathan Lang wrote: In short, R3 isn't neccessarily a subset of A; it's a superset of A B. In a partial ordering graph, there's no reliable ordering between R3 and A. The standard syntax for creating roles can't reliably produce a subset of an existing role, because it always allows

Threads, magic?

2006-10-20 Thread Relipuj
How does one do this: http://www.davidnaylor.co.uk/archives/2006/10/19/threaded-data-collection-with-python-including-examples/ in perl 6? Assumin get_feed_list, get_feed_contents, parse_feed, and store_feed_items are handled by modules like LWP and XML::Parser. Will there be something native

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, I wrote: In fact if we decide to specify a role combination syntax then it should be the same everywhere. That means in a signature A|B would require a more specific type and pure A or B wouldn't be admissible. To get the old meaning of | you have to write AB or perhaps the juxtaposition

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, I wrote: Yes, but I was conjecturing that the additions to AB are pushed down to A and B such that their intension sets remain strict supersets of AB. Think of the Complex example that might read role Complex does Num !Comparable { method im { return 0; } method re {

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: In short, R3 isn't neccessarily a subset of A; it's a superset of A B. In a partial ordering graph, there's no reliable ordering between R3 and A. The standard syntax for creating roles can't reliably produce a subset of an existing role, because it always

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Here is yet another idea to go with the two lattice operations: /\ meet also: infimum, intersection, glb (greatest lower bound) \/ join also: supremum, union,lub (least upper bound) I have to admit: if it turns out that '' and '|' can't be used for 'intersection'

Re: set operations for roles

2006-10-20 Thread Larry Wall
On Fri, Oct 20, 2006 at 09:10:12AM -0700, Jonathan Lang wrote: : TSa wrote: : Here is yet another idea to go with the two lattice operations: : :/\ meet also: infimum, intersection, glb (greatest lower bound) :\/ join also: supremum, union,lub (least upper bound) : : I have

Re: class interface of roles

2006-10-20 Thread Larry Wall
On Thu, Oct 19, 2006 at 03:31:18PM -0700, Jonathan Lang wrote: : Larry Wall wrote: : Though actually, now that I think about it, the cascaded notation : in S12 is illegal according to S03, since does is classified as : non-chaining, which implies non-associative. : : Wait a minute. Isn't

[svn:perl6-synopsis] r13252 - doc/trunk/design/syn

2006-10-20 Thread larry
Author: larry Date: Fri Oct 20 17:01:15 2006 New Revision: 13252 Modified: doc/trunk/design/syn/S12.pod Log: does operator is non-associative according to S03. Leave it that way for now. Modified: doc/trunk/design/syn/S12.pod

Re: class interface of roles

2006-10-20 Thread Jonathan Lang
Larry Wall wrote: Presumably $obj does (A,B,C) could also be made to work even with non-associative does. Right. Note that you _do_ want to be able to do something to the effect of ordered composition in a single statement, though: role A { ... method m { ... } }