> If we did that, we'd lose the ability to break or return, since 'do'
doesn't follow the for-style loop protocol.

I'm perfectly happy with that; the `times` method was never about complex
control flow, just simple repetition. `do 10.times {` is a delightfully
self-explanatory contract.

And just as evidence that `do` notation is useful beyond `spawn`:

    $ git grep "do .*{" -- "*.rs" | wc -l
    2019
    $ git grep "do .*spawn" -- "*.rs" | wc -l
    274

> we're likely to switch that to a macro call that passes
explicitly-captured arguments into a thunk struct that owns the explicit
captures

I don't remember seeing much of this idea in the meeting notes, but I do
remember seeing it mentioned in these blog posts (for those who want more
context):

http://smallcultfollowing.com/babysteps/blog/2013/05/30/removing-procs/
http://smallcultfollowing.com/babysteps/blog/2013/06/03/more-on-fns/
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to