in reply to Zen and the Art of Match Variables

Just curious, will Parrot have to implement the match variables this way, too? Or will it be able to do a better job at maintaining the Principle of Least Surprise? I don't know how much of Grammars have been implemented so far, so maybe you can't even answer this yet. Just wondering :)

Update: Changed "Non-" to "Least" in the principle name. Makes better sense.

kelan


Perl6 Grammar Student

Replies are listed 'Best First'.
Re: Re: Zen and the Art of Match Variables
by Elian (Parson) on Mar 25, 2003 at 18:50 UTC
    Perl 6 and parrot regexes are much more self-contained, so this sort of thing won't happen. (I'm torn as to whether to make it happen for the perl 5 compatibility code, but I'm thinking not right now) The only real reason it works like this in perl now is because regexes predate lexicals--if we were doing it over again for perl 5 it wouldn't happen the way it does now.