No such thing as a small change | |
PerlMonks |
Re: Re: Re+ :Perl Idioms Explained: && and || "Short Circuit" operatorsby TimToady (Parson) |
on Oct 23, 2003 at 18:03 UTC ( [id://301660]=note: print w/replies, xml ) | Need Help?? |
I say this becuase its just as reasonable to assume that the optimizer could figure out that a chain of ifs can be represented by a jump table and do the same optimization there. Indeed, Perl4 did precisely that. We kept threatening to do it in Perl5, but nobody ever got around to doing it. Perl6 will need to do it--the switch statement was designed with the assumption that it would be optimized in the simple cases.
In Section
Meditations
|
|