Re: Would it be possible to add “await on first use” to the language?

2017-02-23 Thread Danielle McLean
On 24 February 2017 at 16:19:03, Šime Vidas (sime.vi...@gmail.com) wrote: > To clarify, the idea is to declare and kick off all the concurrent tasks > upfront Well, that's what promises *already* do, even without using the `async` and `await` keywords. You kick off all concurrent tasks up-front -

Proposal: anaphoric if and while syntax

2016-09-30 Thread Danielle McLean
In current ECMAScript, it is legal to place a variable declaration inside the initialiser of a `for` loop, as well as to declare the variable used by a `for...in` or `for...of` loop within the declaring expression:     for (let i = 0; i < 5; ++i) console.log(i);     for (let item of collection) pr

Re: Proposal: add an option to omit prototype of objects created by JSON.parse()

2016-09-29 Thread Danielle McLean
From: Olivier Lalonde (mailto:olalo...@gmail.com) Date: 30 September 2016 at 07:21:10 > Given that JSON.parse doesn't necessarily return an object, would the > noPrototype option would be ignored on e.g. `JSON.parse('"some string"')` or > `JSON.parse('true')`? The noPrototype option should set

Re: Proposal: add an option to omit prototype of objects created by JSON.parse()

2016-09-28 Thread Danielle McLean
From: 段垚 (mailto:duan...@ustc.edu) Date: 28 September 2016 at 16:36:52 > [I]mplementors warn that mutating prototype causes "performance > hazards". You don't actually need to mutate any prototypes to get prototypeless objects out of `JSON.parse` - the reviver function is allowed to return a new

Re: Re: Proposal: anaphoric if and while syntax

2016-09-14 Thread Danielle McLean
"Bergi" wrote: > What about `else` blocks, would the variables be available in them as well? No. If the `else` block executes, then the variable's value would be falsy and therefore presumably not useful for further processing. Of course, there are multiple falsy values in ES, but knowing which

Re: Proposal: anaphoric if and while syntax

2016-09-14 Thread Danielle McLean
On 14 September 2016 at 17:58:24, Viktor Kronvall (viktor.kronv...@gmail.com(mailto:viktor.kronv...@gmail.com)) wrote: > Does this really need new semantic interpretation of the syntax? Using the > `Array.prototype` methods `.forEach` and `.map` already mitigates this > problem as far as I can t

Proposal: anaphoric if and while syntax

2016-09-12 Thread Danielle McLean
In current ECMAScript, it is legal to place a variable declaration inside the initialiser of a `for` loop, as well as to declare the variable used by a `for...in` or `for...of` loop within the declaring expression:     for (let i = 0; i < 5; ++i) console.log(i);     for (let item of collection) pr