Function.prototype.toString and new syntactic forms.

Allen Wirfs-Brock allen at wirfs-brock.com
Wed Aug 14 14:13:01 PDT 2013


See 
https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-07/july-23.md#xx-review-of-proposed-features 
http://wiki.ecmascript.org/doku.php?id=harmony:function_to_string 

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, GeneratorMethod

Presumably, the last of acceptable returned forms should include these new forms?

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130814/9e09e458/attachment.html>


More information about the es-discuss mailing list