On Sun, Mar 17, 2013 at 9:50 PM, Matthew Robb <[email protected]>wrote:

> I know I am late to this party and I am not sure how serious it even is
> but can someone help me understand why function expressions require
> anything special to denote the fact that it's a function?
>
> `
> requestAnimationFrame(onFrame(time) { })
>

The parser would need to tokenize the input until it reached the "{" to
determine whether the input was an PrimaryExpression or FunctionExpression.



> `
>
> The following seems a pretty convenient side benefit:
>
 `
> let onFrame(){}
> const onFrame(){}
> var onFrame(){}
>

This has appeared before, thread starts here:
https://mail.mozilla.org/pipermail/es-discuss/2008-November/008218.html



> function onFrame(){}
>

This is a FunctionDeclaration, nothing new here.


Rick
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to