Scoped binding of a method to an object
bkardell at gmail.com
Sun Oct 13 11:49:01 PDT 2013
On Oct 13, 2013 2:01 PM, "Benjamin (Inglor) Gruenbaum" <inglor at gmail.com>
> Brendan Eich <brendan at mozilla.com> wrote:
> > No, object detection, polyfilling, and even "prollyfilling" are common
and successful adaptationsp on the Web.
> Polyfilling is great _after_ the method has already been added to the
spec. I'm completely fine with adding an Array.prototype.map shim to IE8,
the problem with adding a method that's not on the prototype yet is that
it'll fail in case the spec is different from the implementation I chose.
If you mentioned PrototypeJS, its `.bind` method is one such example.
Note the R though - see prollyfill. org and search public-nextweb for
"prefix" to find a number of debates on this very topic. I too would like
to see a lot of smart folks on the various lists agree to some kind of
best practice on this so we can keep things forward compatible and avoid
situations that potentially break as something moves toward standard - that
bit us a lot historically.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss