On Thu, 24 Jun 2004 10:55:26 -0700, Larry Wall <[EMAIL PROTECTED]> wrote:
Well, any operator or function that knows how to call a closure can function as a short-circuit operator. The built-in short-circuit operators are a bit special insofar as they're a kind of macro that treats the right side as an implicit closure without you having to put braces around it. No reason in principle you couldn't write your own infix macro to do the same thing.
if I got it right, you mean that in perl6 it would be correct (perl5 syntax):
$a and my $b=1;
is the same as
$a and do {my $b=1}
or, more correct:
$a and sub {my $b=1}->()
in perl5 it isn't the same. What about lexical scoping? or "implicit closure" shouldn't be taken literally?