On Nov 22, 2005, at 10:11 AM, ts wrote:

>>>>>> "m" == mathew  <meta / pobox.com> writes:
>>>>>>
>
> m> I'm guessing that's why Ruby doesn't have post-test loops  
> either--to
> m> discourage "German sentence" programming.
>
>  What is a post-test loop ? This
>
> moulon% ruby -e 'i = 0; begin puts i; end while i > 0'
> 0
> moulon%

<URL:http://www.rubycentral.com/faq/rubyfaq-6.html>

That's a block and a single statement, rather than a loop construct.

A real post-test loop would be something like

repeat ... until x

with no extra do ... end required.

And I think that do ... end while x is ugly too. I tend to prefer  
doing something to make the loop condition true initially, then doing  
a normal while loop.


mathew