On Thu, Dec 04, 2008 at 04:40:32PM +0100, Aristotle Pagaltzis wrote:
> * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-12-03 21:45]:
> > loop {
> > doSomething();
> > next if someCondition();
> > doSomethingElse();
> > }
>
> I specifically said that I was aware of this solution and that I
> am dissatisfied with it. Did you read my mail?
While this is still the same solution that you dislike, how about
recasting it a bit:
loop {
PRE_CONDITION: {
doSomething();
}
last unless someCondition();
BODY: {
doSomethingElse();
}
}
That uses additional indenting and labelling to identify the iteration-setup
and actual loop body parts, and keeping the termination condition easily
visible with non-indenting.