On 24 March 2010 21:52, Jonathan S. Shapiro <[email protected]> wrote:
> On Wed, Mar 24, 2010 at 1:11 PM, Michal Suchanek <[email protected]> wrote:
>>
>> I would say that foreach cycle and while cycle are fundamentally
>> different and while you can make them use the same keyword and similar
>> syntax it does not change that.
>
> I agree. I made an unfortunate choice of subject line. The cases I'm
> actually concerned about here are the "while" and "do" loop cases. The
> "do" loop is easier.
>

You mean the C

while() {}

and

{} while();

loops?

I would expect that for(;;) would not be needed when constructs like
foreach or map are available so you can just have a syntax which
allows the condition to be at the beginning or the end like

loop {} while()

and

loop while() {}

Since this is last resort for cases when cleaner solutions fail I
don't think that the requirement of two keywords is too much.
The two keyword syntax is also reasonably unambiguous and makes it
possible to detect incomplete loops that lack the condition or the
command during compilation.

Thanks

Michal
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to