On Sun, Aug 11, 2013 at 3:18 PM, Jens Nockert <[email protected]> wrote:
> > On 12 Aug 2013, at 00:09, Tom Lee <[email protected]> wrote: > > Anyway, this sort of confusion is exactly why I don't like for..else. But > then maybe I'm the only one that's confused here. :) > > > Obviously you were not the only one, since there was a long thread without > clarification. > > While I think it is reasonably clear (since I am used to it), I don't > think it is more clear than something like (in faux pyrust) > > let iterations = xrange(100); > > for i in iterations { > … > if converged { > break; > } > } > > if iterations.finished() { > fail!("Oh noes, it did not converge"); > } > > I really like this. There's no room for confusion here. > And I most certainly don't think for-else is more clear than a good macro > implementation of a similar pattern. > > What I am worried about is that we add more edge-cases to syntax. The more > syntax we add, the more likely it is that people will just use a subset and > then be really confused when someone uses something special (break out of > ifs in JS anyone?) > > > I think we agree on all of this. Cheers, Tom -- *Tom Lee */ http://tomlee.co / @tglee <http://twitter.com/tglee>
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
