I now realize that my previous message was a little hard to read (plus I
sounded a bit harsh, which I did not mean to be, I was just excited,
thinking about this), because I insisted on being sort of stilted in my
pseudo-BNF. Here's a cleaner shot at what I meant:

        flow:
                control 'else' flow |
                control 'else' block |
                control ;
        control:
                controlkey expr '->' closuredef |
                controlkey expr block |
                'loop' block |
                'loop' expr ';' expr ';' expr block ;
        controlkey:
                'if' | 'unless' | 'while' | 'until' | 'for' | 'when' ;
        block: '{' statements '}'

That should be a bit easier to appreciate. I find myself looking at this
and loving Perl just a little bit more....

Again, my example from before:

        unless my $fh = $x.open {
                die "Cannot open $x: $!";
        } else while $fh.getline -> $_ {
                print;
        } else {
                die "No lines to read in $x";
        }

That does seem to roll of the tongue, does it not?


Reply via email to