Juerd writes:
> Assuming the following are true:
>
> A: "if" is now a normal function
Almost. It's a statement-level form, which looks like a normal function
except for the statement: prepended on its name. Such constructs (which
include for, while, the whole gang) have a few special properties:
* They can't be used intra-expression.
say 3 + if foo() { 4 } else { 5 } # error!
* An opening brace anywhere (not inside brackets) in operator position
gets passed to them:
sub foo ([EMAIL PROTECTED]);
sub bar ([EMAIL PROTECTED]);
if foo 1, bar 2 { ... }
^ belongs to the if
You could use if() intra-expression like so:
say 3 + &statement<if else>().({foo()}):{4}:{5};
(Ick).
Luke