Re: Proposal: `await.all {...}` for parallelism

2019-11-21 Thread Matthew Morgan
Why not just use a combination of `async`/`await` and `.then`? ```javascript async function initialize() { const [foo, bar, baz] = await Promise.all([ request('foo.json').then(t => t.data), request('bar.json').then(t => t.data), request('baz.json').then(t => t.data),

Re: Re: Modulo Operator %%

2019-09-24 Thread Matthew Morgan
Now how does this get to becoming a proposal? Is there a TC39 member that has seen this and will introduce it to the committee? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Re: Modulo Operator %%

2019-08-16 Thread Matthew Morgan
Isiah, thank you for composing this proposal. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Modulo Operator %%

2019-08-12 Thread Matthew Morgan
JS needs a modulo operator. It currently has the remainder operator `%` which works in most cases except for negative values. I believe the the `%%` would work great and be easy to remember. let x = (-13) %% 64; is equivalent to let x = ((-13 % 64) + 64) % 64;