Does ‘state’ govern ‘:=’ the way it governs ‘=’? In other words, just as this:
state $x = 1;
only assigns to $x once (per closure), does the same apply to this?
state $x := $y;
I can’t find anything in the specs that implies that it does.
The reason I ask is that I am currently implem
On Sun Jul 08 02:13:13 2012, thoughtstream 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 detai
On Sat Jul 07 22:23:16 2012, thoughtstream wrote:
> Father Chrysostomos asked:
>
> > What I am really trying to find out is when the subroutine is actually
> > cloned,
>
> Yes. It is supposed to be (or at least must *appear* to be),
> and currently is (or appears to
since it is very similar to what I came up with on
> my own.
>
> If a sub is conceptually cloned when the block enters, does that mean
> that my $code = &bar (\&bar in p5) twice in a row should produce the
> same value?
>
> How does Perl 6 deal with my subs in for loops?
This question might be more appropriate: In this example, which @a does
the bar subroutine see (in Perl 6)?
sub foo {
my @a = (1,2,3);
my sub bar { say @a };
@a := [4,5,6];
bar();
}
--
Father Chrysostomos
On Sat Jul 07 18:35:03 2012, tom christiansen wrote:
> "Father Chrysostomos via RT" wrote
>on Sat, 07 Jul 2012 17:44:46 PDT:
>
> > I’m forwarding this to the Perl 6 language list, so see if I can
> find
> > an answer there.
>
> I do have an answer