in reply to How will you use state declared variables in Perl6?
So how will you use state declared variables in Perl6?
I would also use them with great caution, as I do with the Perl 5 closure equivalent. Named subs can become non-reentrant and impure. Currently, I think only caching of pure things is a good use, and for everything else, you should use some kind of instances. Since memoization will probably be available, probably not even for caching, will state be used much.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How will you use state declared variables in Perl6?
by Limbic~Region (Chancellor) on Nov 04, 2006 at 23:41 UTC | |
by TimToady (Parson) on Nov 05, 2006 at 05:15 UTC | |
by BrowserUk (Patriarch) on Nov 05, 2006 at 10:39 UTC | |
by TimToady (Parson) on Nov 06, 2006 at 06:18 UTC | |
by Juerd (Abbot) on Nov 05, 2006 at 23:50 UTC | |
by TimToady (Parson) on Nov 06, 2006 at 06:07 UTC | |
by Juerd (Abbot) on Nov 06, 2006 at 09:32 UTC |