On 3/27/12 1:56 PM, Marijn Haverbeke wrote:
One question: does the for loop generate
a return value? Is it just whatever the function itself returns?
Correct. I'm not 100% sure this is desirable yet -- it's more
flexible, which is good, but it also means that if you, for example,
use vec::all as your iterator, you'll need a semicolon after the loop,
or you get a type error.
True. But it's not clear to me why you would use vec::all() for the
loop function unless you wanted to know whether you broke out of the
loop or not (in other words, if you don't want to see the result, don't
use vec::all()). This is a very common thing to want to know.
Anyway, nice work.
Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev