On 2008-Dec-5, at 7:43 am, David Green wrote:
Now the condition is in the middle and is syntactically separate. (It's still not up front, but if the first block is really long, you can always... add a comment!)

Well, you don't need a comment -- why not allow the condition to come first?

        repeat while ( condition(); )
                { something(); },
                        { something_else(); }

You need the comma there because the final semicolon is optional, and we don't want Perl to think it's an ordinary loop followed by an independent block. Probably better is to name the introductory block, and then programmers as well as compilers know that something unusual is going on:

        repeat while (condition)
                preamble { something }
                        { something_else }


Reply via email to