Re: [perl #113930] Lexical subs

2012-07-08 Thread Damian Conway
> But by using the term ‘variable’, which is ambiguous, you are not > answering my question! :-) Sorry. I tend to think of *every* variable name as merely being an alias for some underlying storage mechanism. ;-) > Does > > my $x; > for 1..10 -> $x {} > > cause the existing name $x to ref

Re: [perl #113930] Lexical subs

2012-07-08 Thread Moritz Lenz
On 07/08/2012 09:57 PM, Father Chrysostomos via RT wrote: > my $x; > my sub f { say $x } > for 1..10 -> $x { f(); } It prints Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() (because Any is the default value in uninitialized variables). As an aside, you can run short Per

Re: When do named subs bind to their variables? [perl #113930]

2012-07-08 Thread Moritz Lenz
On 07/08/2012 11:12 AM, Damian Conway wrote: > Father Chrysostomos pointed out: > >> I said when, not whether. :-) > > Isn't that just typical of me: confusing ontology with chronology. ;-) > > I'm afraid don't know the implementation details for Rakudo. It may be > bound as the surrounding block i

Re: When do named subs bind to their variables? [perl #113930]

2012-07-08 Thread Moritz Lenz
On 07/08/2012 11:12 AM, Damian Conway wrote: > Father Chrysostomos pointed out: > >> I said when, not whether. :-) > > Isn't that just typical of me: confusing ontology with chronology. ;-) > > I'm afraid don't know the implementation details for Rakudo. It may be > bound as the surrounding bloc

Re: When do named subs bind to their variables? [perl #113930]

2012-07-08 Thread Damian Conway
Father Chrysostomos pointed out: > I said when, not whether. :-) Isn't that just typical of me: confusing ontology with chronology. ;-) I'm afraid don't know the implementation details for Rakudo. It may be bound as the surrounding block is entered, or perhaps just-in-time when the Code object i