Hi Brendan,
I would be surprised if we ever evolved a version that lost the default
this binding whereby
var o = {m: function(){print(this.x);}, x: 42};
o.m();
Right, but if it was a lambda instead:
var o = {m: lambda(){print(this.x);}, x: 42};
o.m();
the options are:
- Capture the 'this' value in scope when the lambda is defined, and
use that when the lambda is called.
- Always return 'undefined' when 'this' is evaluated within a lambda.
- Any others?
Do either of these policies make lambdas useful language constructs as
compared with normal functions?
Michael
--
Print XML with Prince!
http://www.princexml.com
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss