Interesting that that matters. I wouldn’t have thought so – given that modules
export references, not values.
On 20 Nov 2014, at 01:54, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Nov 19, 2014, at 4:42 PM, Axel Rauschmayer a...@rauschma.de wrote:
OK, I take it the following
Quoting https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports
`export default` HoistableDeclaration
`export default` [lookahead ≠ `function`] AssignmentExpression `;`
Questions:
* Do these grammar rules mean that you have to put anonymous function
expressions in parentheses? Is
On Nov 19, 2014 6:54 AM, Axel Rauschmayer a...@rauschma.de wrote:
Quoting https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports
`export default` HoistableDeclaration
Note that the actual spec. text has a [Default] grammar parameter after
HoistableDeclaration. That,'s important.
* Do these grammar rules mean that you have to put anonymous function
expressions in parentheses? Is that desirable (given that it’s a frequent
use case)?
No, HoistableDeclaration[Default] includes FunctionDeclaration that lacks a
BindingIdentifier.
OK, I take it the following wasn’t
On Nov 19, 2014, at 1:59 PM, Axel Rauschmayer a...@rauschma.de wrote:
* Do these grammar rules mean that you have to put anonymous function
expressions in parentheses? Is that desirable (given that it’s a frequent
use case)?
No, HoistableDeclaration[Default] includes FunctionDeclaration
OK, I take it the following wasn’t viable?
that’s correct. We wanted the initialization of a function like:
export default function () {}
to be hoisted, just like:
export function f() {};
I suspect that that will confuse people: they will expect an anonymous function
to be an
On Nov 19, 2014, at 4:42 PM, Axel Rauschmayer a...@rauschma.de wrote:
OK, I take it the following wasn’t viable?
that’s correct. We wanted the initialization of a function like:
export default function () {}
to be hoisted, just like:
export function f() {};
I suspect that that
7 matches
Mail list logo