Why is the do {...} literal added in Pugs 6.2.5?
It would be better that
loop {...} while EXPR;
loop {...} until EXPR;
would work, like it is written in Synopsis 4: Blocks and Statements
Gerd Pokorra
Because do {...} is a part of the language, while or no while. Perl 6
is supposed to die if you say do {...} while, which isn't implemented
in pugs yet. But the special delayed evaluation of the condition
isn't in pugs either, and it shouldn't be.
I expect it should be pretty simple to implement:
> loop {...} while EXPR;
> loop {...} until EXPR;
Luke
Yep. It was. Done as of r4171.
Luke
In particular, we'd like "do {...} while" to die because do {...}
is now defined to be the "once" loop, and you can't put two different
loop specifiers on the same block. (Bare blocks are no longer "once"
loops as they are in Perl 5. That functionality has moved to "do".)
Larry