in reply to Re: Perl 6 rules and complexity
in thread Perl 6 rules and complexity

Judging by Apocalypse 5 it won't be possible to execute arbitrary code in rule actions. At least I can't find any examples of anything besides manipulating "hypothetical" variables, so maybe it will be memoizable.

Unfortunately after a quick look, I don't fancy digging through PIR, especially as that seems to be in very early stages and probably bearing no resemblance to it's final state.

Replies are listed 'Best First'.
Re^3: Perl 6 rules and complexity
by TimToady (Parson) on Feb 17, 2006 at 02:10 UTC
    Any arbitrary code is allowed in rule actions, just as you can put any arbitrary code into a yacc grammar's reductions. Perl likes to optimize for power over purity unless you specify otherwise somehow.