Function.prototype.toString and new syntactic forms.
Mark S. Miller
erights at google.com
Wed Aug 14 14:36:15 PDT 2013
Yes for those whose meaning is preserved by evaluating the resulting string
as an expression. This is true for GeneratorExpression, ClassExpression,
ArrowFunction. It isn't for MethodDefinition, GeneratorMethod, so they
would need to stringify into something distinct from its source string.
On Wed, Aug 14, 2013 at 2:13 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:
> The wiki proposal says the source code must be returned in the forms of a
> FunctionDeclaration or a FunctionExpression. The meeting notes s;ay it is
> always adequate to preserve and return the original source code.
> What about function objects defined using any of the new syntactic forms:
> GeneratorExpression, ClassExpression, ArrowFunction, MethodDefinition,
> Presumably, the last of acceptable returned forms should include these new
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss