ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
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

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Allen Wirfs-Brock
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.

Re: Value Types shims/transpiler?

2014-11-19 Thread Brendan Eich
Benjamin Gruenbaum wrote: Correct, I mean value types (or objects) that have value semantics and support operator overloading. We'll probably talk about that tomorrow in a break-out. At least I hope to! More after this week's TC39 meeting. /be ___

Re: Value Types shims/transpiler?

2014-11-19 Thread Benjamin (Inglor) Gruenbaum
We'll probably talk about that tomorrow in a break-out. At least I hope to! Thanks, this sounds awesome. It's definitely one of the most awaited ES7 features and it's definitely highly applicable in a lot of code I'm writing (and in a lot I'm reading). If there is any help you guys need with

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
* 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

Re: Proposal: Syntax sugar for single exit and early exit functions.

2014-11-19 Thread Christian Mayer
Am 18.11.2014 um 22:03 schrieb Brendan Eich: Christian Mayer wrote: What I actually sometimes really miss in JavaScript (having a big C++ background) are destructors. (I haven't checked if they are in any new version proposal, though) No, as JS has no stack storage class, only

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Allen Wirfs-Brock
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

Re: {Spam?} Re: Proposal: Syntax sugar for single exit and early exit functions.

2014-11-19 Thread Brendan Eich
Christian Mayer wrote: Am 18.11.2014 um 22:03 schrieb Brendan Eich: Christian Mayer wrote: What I actually sometimes really miss in JavaScript (having a big C++ background) are destructors. (I haven't checked if they are in any new version proposal, though) No, as JS has no stack

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
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

Re: Map: filter/map and more

2014-11-19 Thread Dmitry Soshnikov
(For the history of this thread to refer to it later) At the meeting it was decided not to go with `map` and `filter` sitting on `Map.prototype`, but instead to use iterators in the way like: ``` map .entries() // returns an iterator .map((v, k, m) = { ... }) .filter((v, k, m) = { ... })

Re: Set API

2014-11-19 Thread Dmitry Soshnikov
(For the history of this thread to refer to it later) At the meeting it was decided not to remove `keys()` and `entries()`, and keep the `(value, againValue, set)` callback params signature. The reasons: - Consistency with maps and to reuse callbacks from arrays; - Even if it may seem a wrong

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Allen Wirfs-Brock
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