placeholder attachment?

2004-04-19 Thread Trey Harris
Can anyone explain the rules of placeholder attachment? i.e., in the example in Perl6::Placeholder's manpage, grep { $data{$^value} } 1..10; C$^value is clearly intended to attach to the outer closure C{ $data{$^value} }, not the inner closure C{$^value}. But how does the compiler know

Re: placeholder attachment?

2004-04-19 Thread Larry Wall
On Mon, Apr 19, 2004 at 04:48:05AM -0600, Luke Palmer wrote: : Trey Harris writes: : Can anyone explain the rules of placeholder attachment? i.e., in the : example in Perl6::Placeholder's manpage, : :grep { $data{$^value} } 1..10; : : C$^value is clearly intended to attach to the outer

Re: placeholder attachment?

2004-04-19 Thread Trey Harris
In a message dated Mon, 19 Apr 2004, Larry Wall writes: On Mon, Apr 19, 2004 at 04:48:05AM -0600, Luke Palmer wrote: : Trey Harris writes: : Can anyone explain the rules of placeholder attachment? i.e., in the : example in Perl6::Placeholder's manpage, : :grep { $data{$^value} } 1

Re: placeholder attachment?

2004-04-19 Thread Dave Whipp
Trey Harris [EMAIL PROTECTED] wrote i It's easy to just say don't nest placeholder-using closures, but that doesn't seem workable in practice since every block is a closure, unless placeholders are forbidden from all but the most trivial cases. Absurdly trivial, it seems. How about $sub

Re: placeholder attachment?

2004-04-19 Thread Larry Wall
On Mon, Apr 19, 2004 at 08:57:47AM -0700, Trey Harris wrote: : : It's easy to just say don't nest placeholder-using closures, but that : : doesn't seem workable in practice since every block is a closure, unless : : placeholders are forbidden from all but the most trivial cases. Absurdly :

Re: placeholder attachment?

2004-04-19 Thread Larry Wall
On Mon, Apr 19, 2004 at 09:42:14AM -0700, Dave Whipp wrote: : Trey Harris [EMAIL PROTECTED] wrote i : It's easy to just say don't nest placeholder-using closures, but that : doesn't seem workable in practice since every block is a closure, unless : placeholders are forbidden from all but the