Re: Introspect bind function targets

2019-02-04 Thread Jordan Harband
Given that you can also do `const c = (...args) => proto.call(null, ...args);`, and `Function.isSameTarget(a, c)` would presumably be `false`, can you elaborate more on the use case for this? On Mon, Feb 4, 2019 at 9:38 AM Sultan wrote: > A way to determine if two bound functions reference the

Re: NumberFormat maxSignificantDigits Limit

2019-02-04 Thread Waldemar Horwat
There is precedence for using numbers around 20 for significant digit cutoffs in the spec. For example, if you look at how number tokens are parsed in the spec (ยง11.8.3.1), the implementation has the option to ignore significant digits after the 20th. That's not a bug; we did that

Introspect bind function targets

2019-02-04 Thread Sultan
A way to determine if two bound functions reference the same target function. For example: function proto () {} const a = proto.bind(null, 1) const b = proto.bind(null, 2) console.assert(Function.isSameTarget(a, b)) ___ es-discuss mailing list

Re: returning non-Promise values from async functions and running them synchronously (or Promise.sync() idea)

2019-02-04 Thread David Teller
Unfortunately, turning async code (which often has components that execute in a different thread or process) back into in sync code is really, really hard. What semantics would you give to this `Promise.sync()`? Can other code be executed by the main thread while you're waiting for your promise