Re: Single destructuring argument to an arrow function

2015-03-20 Thread Kevin Smith
> But we could extend the cover grammar with some work. You'd have to push > ArrayLiteral and ObjectLiteral down from PrimaryExpression alternative > right-hand sides, to live under > CoverParenthesizedExpressionAndArrowParameterList.Seems > do-able -- anyone see a fatal problem? Not for ES6 arr

Re: Single destructuring argument to an arrow function

2015-03-20 Thread Niloy Mondal
Really awesome if we could have this feature. On Sat, Mar 21, 2015 at 4:04 AM, Brendan Eich wrote: > But we could extend the cover grammar with some work. You'd have to push > ArrayLiteral and ObjectLiteral down from PrimaryExpression alternative > right-hand sides, to live under > CoverParenth

Re: Single destructuring argument to an arrow function

2015-03-20 Thread Brendan Eich
But we could extend the cover grammar with some work. You'd have to push ArrayLiteral and ObjectLiteral down from PrimaryExpression alternative right-hand sides, to live under CoverParenthesizedExpressionAndArrowParameterList.Seems do-able -- anyone see a fatal problem? Could be an ES7 relaxati

Re: Single destructuring argument to an arrow function

2015-03-20 Thread Rick Waldron
Inline... On Thu, Mar 19, 2015 at 4:50 PM Jan-Ivar Bruaroey wrote: > Hi group! First post, so be gentle. > Welcome > > I love how arrow functions allow single arguments to be passed without > parenthesis, so I expected this to work: > > Promise.all([true, false]).then([foo, bar] => consol

`import` and hoisting

2015-03-20 Thread Axel Rauschmayer
As far as I can tell, `import` is hoisted (due to `ModuleDeclarationInstantiation`). Is the following code OK, then? No temporal dead zone? ```js bar(); import {foo} from 'mymodule'; function bar() { // hoisted! foo(); // already initialized? } ``` How about this code? ```js foo(); impo