Promise finally

2018-02-25 Thread Raul-Sebastian Mihăilă
This is an illustration of the current `Promise.prototype.finally` deficiency. In this example, the `incr` method does 2 things. It increases `count` by 1. And increases `methodCallsCount` by 1. At a later point in time, it was decided to add an `incr3` method that did the same, but increase

Re: Destructuring into object

2018-02-25 Thread Alex Shvets
Yes, I've read it, but I doesn't find something like this: target.{a,b,c} = srcObject Thank You! - Alexander Shvets https://github.com/transpiling/destructuring-into-object ___ es-discuss mailing list es-discuss@mozilla.org

Re: Destructuring into object

2018-02-25 Thread Bob Myers
I presume you've read the historical threads on this topic, which go back several years. Bob On Mon, Feb 26, 2018 at 11:04 AM, Alexander Shvets wrote: > # The Problem > > ES6 destructuring syntax isn't very readable and useful, especially for > assigning to properties of

Destructuring into object

2018-02-25 Thread Alexander Shvets
# The ProblemES6 destructuring syntax isn't very readable and useful, especially for assigning to properties of existing object: // ES6 ({    a: target.a,    b: target.b,    c: target.c, } = srcObject); // Versus ES3 target.a = srcObject.a; target.b = srcObject.b; target.c = srcObject.c;There

Re: Promise finally

2018-02-25 Thread Raul-Sebastian Mihăilă
I made the PR on the ecma repo so that the diff is smaller (since I'm touching more sections than the proposal repo had). https://github.com/tc39/ecma262/pull/1118/files On Sun, Feb 25, 2018 at 5:27 AM, Jordan Harband wrote: > Simply theorizing about how it might be done -

Re: Re: Async Class

2018-02-25 Thread Dimitrian Nine
([Classes][1]): [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes «JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented