On Sat, Jul 10, 2004 at 04:58:49AM +0400, Alexey Trofimenko wrote:
: On Fri, 9 Jul 2004 13:19:46 -0700 (PDT), Austin Hastings  
: <[EMAIL PROTECTED]> wrote:
: 
: >--- Larry Wall <[EMAIL PROTECTED]> wrote:
: >>If there reasonably can be block modifiers, I will unreasonably
: >>declare that there can't be.  You can always say:
: >>  do { print; next; } if|when /stgh/;
: >>(It's still the case that do-while is specifically disallowed, however.)
: 
: >But I also want do/while to work, solely because repeat/until sucks.
: >What's the big deal there?
: >
: 
: hm..
: 
:   do {...} while ...
: 
: sucks much more:) just because it used as loop, but it isn't really a  
: loop, so you cannot use C<next> or C<redo>.. but IMNSHO to "specifically  
: disallow" it is somewhat unnatural, even if it could save from mistakes  
: many of us, who will think it  works perl5ish way... maybe it just should  
: be written with BIG letters in perl6syn:
: 
:  W A R N I N G ! ! !
:  do {...} while ...
:    DOES CHECK CONDITION (look here>>) __**BEFORE**__ (<<look here) TRYING
:    TO EXECUTE C<DO> BLOCK.      (look here ^^^)
:    because C<do> isn't something special anymore. So just use repeat/until
:    (or something)
: 
: (I correctly guessed true reasons for that, did I? :)

Except people don't actually read the documentation, and when they
do read it, they don't understand it, and when they do understand it,
they'll write it wrong anyway out of habit.  You might as well write
your warning in Russian for all the good it'll do.  :-)

So we'll force people who want any loop that exits other than at the
top to use:

    loop {
        ...
        last if CONDITION;
        ...
    }

And that means we disallow modifier loops on do-{}.

Larry

Reply via email to