Method definitions in classes/objects

Allen Wirfs-Brock allen at
Mon Oct 8 11:03:47 PDT 2012

On Oct 8, 2012, at 10:54 AM, Brendan Eich wrote:

> Kevin Smith wrote:
>> Also, if concise methods introduce a binding, then there's the hazard that an outer binding of the same name will get unintentionally shadowed.
> I have to agree with Kevin and I think Allen: the |this| binding requirement means defining the *method* name as a free variable misleads. It can only be used correctly in general after "this." or "other.", so we should not translate concise method definitions to property definitions of named function expressions.

The current draft spec. does not introduce a binding for the method name and this thread did a good job of re-identifying the reasons.  I doesn't sound like we should change the draft in this regard.


More information about the es-discuss mailing list