Hmm? I think you think I meant that `loop` should accept a condition in
front of the loop, like `while`? In fact my idea was sillier: just replace
all instances of `while foo { bar }` with

    loop {
        if !foo { break }
        bar
    }


On Wed, Nov 20, 2013 at 9:56 PM, Benjamin Striegel
<[email protected]>wrote:

> > This is an even sillier idea, but then what about keeping `loop` and
> dropping `while`?
>
> I'm not sure this is possible to disambiguate in the grammar. You'd have
> to be able to tell the difference between the infinite form:
>
>     loop <block>
>
> ...and the conditional form:
>
>     loop <expr> <block>
>
> ...while keeping in mind that <expr> can also be a <block>.
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
>


-- 
Your ship was destroyed in a monadic eruption.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to