On Nov 30, 2013, at 10:20 AM, Patrick Walton <pcwal...@mozilla.com> wrote:
> On 11/30/13 10:05 AM, Kevin Cantu wrote: >> While we're changing this stuff, I'd like to see lambdas allow return, >> now that the need for forbidding that is gone, IIRC. That's more likely >> to continually trip me up than unusual allocation mechanisms. > > No objections here. Quite a while ago the restriction on `return` was explained to me as conforming to some principle (I forget the name, sadly) that basically says that wrapping a block of code in a closure and immediately calling the closure should not change the semantics of the code. Basically, `return` shouldn't return from the lambda because that's not what it would do if the closure was inlined manually. I didn't really understand the point of this, of course. -Kevin _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev