The special treatment will be gone (running once before testing the condition). To avoid that people blindly copy over the Perl 5 idiom to Perl 6 and then complain that it "doesn't work", do-while will be made impossible. Even though I understand that this way less people will complain, I am against such arbitrary limits: with *less* code in the core, *more* can be done.

If anything, I believe it should be a warning in the perl5 category. A category that is on by default at first (even without "use warnings"), loaded with other warnings (only with "use warnings") as Perl 6 becomes more popular, and only loaded when explicitly requested (only with "use warnings :perl5") when we start thinking of Perl 5 as we do of Perl 4 now.

The replacement is obvious and much easier to understand, because it doesn't depend on a special exception made for do-while:

{ ... ... redo if EXPR; }
I recommend writing it like that even in Perl 5.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


In reply to Re: Disappearance of 'do while' in perl6 by Juerd
in thread Disappearance of 'do while' in perl6 by ikegami

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.