Arrow binding

Axel Rauschmayer axel at
Mon Apr 23 07:56:14 PDT 2012

On Apr 23, 2012, at 16:17 , Alex Russell wrote:

> Having done this dance a couple of times, let me suggest to you that
> the method form will *eventually* end up at a per-class getter on the
> prototype which vends an instance function which is bound. People will
> (reasonably) want binding of some sort.

An important use case. However, wouldn’t it be simpler to achieve the same goal by allowing the following two operations to co-exist?

- "get": obj.method invokes the getter – which hard-binds on demand (but might cache via a weakmap).
- "call": obj.method() invokes the actual method.

Hence, in addition to getters and setters, we would have "callers". If a property doesn’t have a caller then obj.method() would first invoke the getter and then try to call the result.

Dr. Axel Rauschmayer
axel at


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

More information about the es-discuss mailing list