On Fri, Nov 28, 2008 at 8:43 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> class C(x,y) {
> ...
> private self {
> function m1(a,b) { /* use "self" to denote receiver */ ... }
> function m2(c) { /* ditto */ ... }
> ...
> }
> }
Almost may as well just always start the class with a first line like
the following.
class C(x,y) {
var self = this;
function m1(a,b) { /* use "self" to denote receiver */ ... }
function m2(c) { /* ditto */ ... }
}
It gives non-dynamically bound "this" access which was on of the
issues in the wiki page. Probably not enough boiler plate to warrant
sugar.
Peter
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss