> (I forget the name, sadly)

This is usually referred to as Tennet's Correspondence Principle:

http://gafter.blogspot.com/2006/08/tennents-correspondence-principle-and.html

...though it is sometimes debated whether or not the modern interpretation
of this principle is actually what Tennet intended (the book in which it
appeared is apparently quite hard to get a hold of).


On Sat, Nov 30, 2013 at 2:40 PM, Kevin Ballard <ke...@sb.org> wrote:

> 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
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to