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 a...@rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss