[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: continue/repeat...until false dichotomy
- From: Norman Ramsey <nr@...>
- Date: Tue, 16 Feb 2010 21:10:36 -0500
> Agreed, I'd willingly sacrifice [loop-local variables visible in
> the 'until' clause] for "continue". Quite a few people seem willing
> to sacrifice repeat...until in its entirety, which I disagree with
> however. I've used it a quite few times where it's a perfect fit.
I'm a fan of repeat...until. But the current scoping rules are just
wrong. For example, the following program transformation should be
repeat S until E ===> do S end; while E do S end
I've always wondered why Lua didn't have 'continue'; my code is
frequently ugly without it. But even if we can't have 'continue',
I'd like to see 'repeat' fixed.
Now if only we can convince Roberto and Luiz.
At least they have never been afraid to break backward compatibility...