Larry Wall writes:
: This is only slightly less problematic than
:
: NEXT $coderef;
:
: which in turn is only slightly less problematic than
:
: if $condition $coderef;
Actually, that'd probably have to be:
if $condition, $coderef;
Still not sure if that has any possibility of actually working. Maybe
depends on how the regex for the C<if> syntax is written, and whether
such syntax can fall back onto ordinary syntactic conventions.
Probably not. Something tells me that we'd better require the block of
C<if> et al., or we'll have difficulty detecting missing semicolons,
which would try to make an C<if> statement parse as an C<if> modifier.
This has slightly more chance of working:
$condition.if($ifcode, $elsecode)
But really, people will be surprised if you do that. They'll expect
you to write this instead:
$condition ?? $ifcode() :: $elsecode();
So I'm not terribly interested in going out of my way to make statement
blocks parse exactly like terms in an ordinary expressions. If it
happens, it'll probably be by accident.
Larry