On Thu, Feb 17, 2005 at 09:06:47AM -0800, Larry Wall wrote:
> Junctions can short circuit when they feel like it, and might in some
> cases do a better job of picking the evaluation order than a human.
Hmm, yes, there is an interesting interaction with lazy
evaluation ranges here.
$x = any( 1 .. 1_000_000_000 );
if( $y == $x ) { ... }
It would be nice if the junction equality test here was much
smarter than a for loop (regardless of whether the for loop
short circuited - suppose $y happens to be -1!).
A range need not enumerate all of its components to be used
in a useful way.
--