On Tue, Jan 08, 2013 at 12:14:22PM -0500, Ted Zlatanov wrote:
> On Mon, 7 Jan 2013 17:51:52 +0100 Carl Mäsak <cma...@gmail.com> wrote: 
> 
> CM> Ted (>):
> >> Are state variables available now, or is the every(N) functionality
> >> possible in some other way now?
> 
> CM> Why not try it by writing a small program? :)
> CM> $ perl6 -e 'sub foo { state $s = 0; say $s++ }; foo; foo; foo'
>
> Since I'm writing a module, I didn't think a one-liner was sufficient
> proof that state variables are reliable.  Sorry I didn't make that
> clear.  [...]

Also, if the state variables currently behave as you expect, and we
want to insure their reliability for the future, add a spectest to 
the "roast" suite.  This way we'll also quickly discover if other 
Perl 6 implementations differ on this point.  :-) 

Thanks!

Pm

Reply via email to