On Sat, Nov 30, 2013 at 9:34 AM, Oren Ben-Kiki <[email protected]> wrote:
> That would help a bit, but it would still require the programmer to > manually setup and teardown the tuples, pass them to the closure, and so > on. We'll also need to change each and every function that takes an action > parameter to take the extra tuple in every container or container-like > type. And then there's the possibility of modifying variables... It sounds > like a lot of effort working around something the compiler can do > automatically and actually already does automatically; all it needs is the > ability to communicate the programmer intent via the type system so it can > support and enforce it. > I agree, having annotations so that the type system can enforce safety is a better idea than hacking around it with alternate versions of every function for taking closures only used once.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
