And going into sub prototype sublime you can also do:
sub then (&@) { @_ }
sub elsedo (&@) { @_ }
my $x = 2;
my_if_else $x < 0,
then { say "$x is lower than zero" }
elsedo { say "$x is greater or equal to zero" };
But yes, I do get your point about proc/sub. There is only so far you could (and should!) stretch the parsers syntax.
There is always macros (see Devel::Declare in Perl) if you're mad enough to want cosmetic purity :)
Here goes again....
And going into sub prototype sublime you can also do:
But yes, I do get your point about proc/sub. There is only so far you could (and should!) stretch the parsers syntax.There is always macros (see Devel::Declare in Perl) if you're mad enough to want cosmetic purity :)