Necessity of a syntax construct for bind

Mark S. Miller erights at
Tue Aug 30 10:30:33 PDT 2011

You may be interested in

A reason your exercise is more pressing than it may seem is that f.p.bind is
still missing on WebKit Nightly. See <>. I agree with your
assessment that it is not possible to do a conformant implementation in

On Tue, Aug 30, 2011 at 9:42 AM, David Bruant <david.bruant at> wrote:

>   Hi,
> A couple of people (including myself) have been working on trying to
> implement a Function.prototype.bind pure-JS implementation as close to the
> spec as possible.
> Despite the fact that this is impossible, all implementations relied on the
> built-in (or Function.prototype.apply). Also,
> Function.prototype.bind is writable and configurable.
> This leads to the situation that, on my code, when i write f.bind(obj), it
> is either unreliable or for it to be reliable, i am forced to make at least
> Function.prototype.bind non-configurable (and non-writable or a getter that
> returns the same and correct value) (and do the same thing to
> if i'm emulating Function.prototype.bind) or
> add a bind own property to every function i am susceptible to bind.
> A syntax construct allowing reliable binding without having me to go over
> one of the previous solutions would be welcome I think.
> The CoffeeScript-inspired arrow_function_syntax strawman [1] seems to have
> such a syntactic construct (though i'm not really sure i understand it, i'd
> need more examples).
> What i wish is a syntax equivalent to Function.prototype.bind (which would
> take a function and an object as input and generate a bound function as
> output)
> David
> [1]
> Ps : I sent this message already on August 19th and August 26th, but i
> haven't seen it popping up on es-discuss, sorry for the spam if it appears
> several times
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list