News for hackers. Stuff that matters.
Re:Philosophy and "for" loops — more from Go and Rust by dbaupp on Thursday July 11, 2013 @10:45AM (#6026314)
As kibwen explains above, Rust is just switching the dominant iteration protocol to external iterators, i.e. the protocol privileged/understood by the `for` syntactic sugar. It will still perfectly possible to write

  do tree.visit_each_leaf |leaf| {
    // ... do things with leaf ...

    if some_continuation_condition { true } else { false }
  }
(The last line is the replacement for what would be currently written `if !some_continuation_condition { break }` with the `for` sugar.)

There are no comments on this comment yet.