in reply to Re^3: How will you use state declared variables in Perl6?
in thread How will you use state declared variables in Perl6?
Yes. That is a good example of the possible surprise factor.
Now inherit Class Qux from Class Bar, and every time you call ->foo() from any instance of either class, state $bar will be incremented. This has the potential for an even bigger surprise factor I think.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How will you use state declared variables in Perl6?
by TimToady (Parson) on Jul 08, 2005 at 22:44 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2005 at 22:49 UTC | |
by TimToady (Parson) on Jul 08, 2005 at 23:12 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2005 at 23:23 UTC | |
by TimToady (Parson) on Jul 08, 2005 at 23:34 UTC |