Re: Interrogating closures

2006-11-30 Thread Yuval Kogman
On Thu, Nov 30, 2006 at 09:13:42 -0800, Larry Wall wrote: > my $x = 42; > &f := sub { > have $.x; > say $x; > ... > } > say &f.x; hmm... That looks nice. Maybe even this makes sense: sub { have $.x; method blah { }

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

2006-11-30 Thread Larry Wall
On Thu, Nov 30, 2006 at 09:43:40AM +0100, TSa wrote: : HaloO, : : [EMAIL PROTECTED] wrote: : >$_ $xType of Match ImpliedMatching Code : >== = == : >+ Set Set members identicalmatch if $_ === $x : > + Ar

Re: Interrogating closures

2006-11-30 Thread Larry Wall
If I follow what you're saying (and this is by no means a certainty :) I would tend to look more for a declarative solution than a callback solution, so I'm imagining that any closure could have a declarator that explicitly captures an outside lexical and makes it available as an attribute. I don'

Re: beg for Bag

2006-11-30 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: > Would (1,2,2,3,4,4) be a Seq or a Bag? Comma constructs a Seq, of course. The context of the question was that you provided the above as the result of unioning two Seqs; as such, I was trying to find out whether you meant that the union of two Seqs should be a

Interrogating closures

2006-11-30 Thread Yuval Kogman
Hi, I think a partial unification of objects and code refs in userspace is going to be a nice features. Closures allow people to put arbitrary complexity into a very simple api that is, in OO terms, just one method (the actual function call). Consequentially the closure may never reveal any info

Re: beg for Bag

2006-11-30 Thread TSa
HaloO, Jonathan Lang wrote: Would (1,2,2,3,4,4) be a Seq or a Bag? Comma constructs a Seq, of course. IMHO, the _only_ way this could work would be if it's a Bag: if it's a Seq, I see no way that one could resolve '(1,2,3) ∪ (3,1,2)'. This is not any different from '3' + '4' resulting in

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

2006-11-30 Thread TSa
HaloO, [EMAIL PROTECTED] wrote: $_ $xType of Match ImpliedMatching Code == = == + Set Set members identicalmatch if $_ === $x > + Array Set array equivalent to set match if Set($_) === $x I