On 05/12/2011 5:27 AM, Marijn Haverbeke wrote:

If bind is staying (there was talk of removing it in favour of lambda
at some point), I think we can do without lambda. But the concept of
shared closures (which is what bind creates) would still be there.

I don't have a strong feeling about it. I initially didn't want *any* direct environment capture forms, just bind, but I definitely have a higher level of pain tolerance on this issue than most :)

I think blocks seem to be handling most of the "one-off throwaway function" uses in our code, most of the time, right now. But we're not done exploring the space of code-to-write. Compilers aren't everything.

I think the use-case for shared lambda is registering persistent callbacks, such as in a GUI.

I think the use-case for registering unique lambda is spawning tasks. We hack around this now but need it eventually.

How awkward would these be without lambda? What do you have in mind for the unique closures?

-Graydon
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to