A new function name property proposal
Jorge Chamorro Bieling
jorge at jorgechamorro.com
Sat Nov 17 00:57:28 PST 2012
On 16/11/2012, at 21:46, Brandon Benvie wrote:
> Yeah, once you try to get fancy with interpolating a name you go down a dark path real quick. I think that tends to be more in line with the concept behind displayName which is the debug flavor of this and wants to do heroic feats to trace a usable debug name. The name property should be something that you'd actually purposefully write out yourself, not a derived object path. This is where the writability comes in. If the author does fail to hit the mark and doesn't provide a usable name, they can at least manually set it after the fact.
Remember that a function's name is more than that string attached to function.name: it's also that var declared inside the function whose value is the function itself.
When you talk about writable and automatically generated names, do you mean both the string in function.name *and* that var's name?
More information about the es-discuss