Method definitions in classes/objects
erik.arvidsson at gmail.com
Mon Oct 8 09:20:57 PDT 2012
On Mon, Oct 8, 2012 at 11:54 AM, Allen Wirfs-Brock
<allen at wirfs-brock.com> wrote:
> I don't believe that we have discussed, at a meeting, property name capture
> (other than WRT super) of ConciseMethod definitions. It is however,
> something that I have thought about quite a bit. Concise methods, as
> currently specified, do not create a local binding for the property name
> whose value is the function.
I think we talked about this when we talked about concise methods in
object literals, before classes where approved.
A local binding would only be added of the name was an identifier
> However, these issues could be dealt with and and I've always seen this as a
> pretty close call. Are there strong use cases for giving methods a
> FunctionExpression-like binding of the property name?
In classes I don't think it matters much, because it is most likely
the wrong to use the function without this.
More information about the es-discuss