Scoped binding of a method to an object

Benjamin (Inglor) Gruenbaum inglor at
Sun Oct 13 11:19:24 PDT 2013

Keeping a third parameter beyond object and property name seems

In my likely naive eyes, dynamic  `this` gives us great power here.
Thinking about other languages that deal with the problem. As far as I
remember C# extension methods are just (really nice) syntactic sugar for

Is it difficult to convert something like:

Array.prototype.last = function(){ return this[this.length-1] }

To something like

function Array$prototype$last(param1){ return (function(){ return
this[this.length-1] }).call(param1); }


---------- Forwarded message ----------
From: Erik Arvidsson <erik.arvidsson at>
To: Brendan Eich <brendan at>
Cc: es-discuss <es-discuss at>
Date: Sun, 13 Oct 2013 13:32:23 -0400
Subject: Re: Scoped binding of a method to an object
We did proposes this back in 2011

I wasn't at this actual F2F meeting so I don't know many details.
Brendan might remember what the blocking issue was?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list