Re: setTimeoutAt(cb, date)

2017-07-08 Thread Isiah Meadows
Previous discussion: https://esdiscuss.org/topic/standardize-global-settimeout-etc On Sat, Jul 8, 2017, 15:53 Cyril Auburtin wrote: > What would you think of this function allowing to run a callback at a > given date? > ___ >

setTimeoutAt(cb, date)

2017-07-08 Thread Cyril Auburtin
What would you think of this function allowing to run a callback at a given date? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread Allen Wirfs-Brock
Note that something similar was given serious consideration by TC39 for ES6 but was ultimately being rejected: http://wiki.ecmascript.org/doku.php?id=harmony:concise_object_literal_extensions You can probably

Re: Math.minmax

2017-07-08 Thread Boris Zbarsky
On 7/4/17 9:34 PM, Jordan Harband wrote: The results I get range from a 2x improvement for 2 numbers, to a 3x improvement for 1000 numbers Again, did you test without the array destructuring and recreation bits? I expect those dominate here, just like in the jsbench benchmarks posted

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread T.J. Crowder
On Sat, Jul 8, 2017 at 1:36 PM, kai zhu wrote: > legitimate Object.defineProperties use-case is low and obscure enough it > can stay verbose. most of the time it causes more code-maintainability > issues / tech-debt than it solves. > Can't agree with that opinion. But we

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread kai zhu
legitimate Object.defineProperties use-case is low and obscure enough it can stay verbose. most of the time it causes more code-maintainability issues / tech-debt than it solves. On Jul 8, 2017 7:51 PM, "T.J. Crowder" wrote: > On Sat, Jul 8, 2017 at 8:09 AM,

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread kdex
What about non-enumerability? If we had a new token for each combination of { non-writable, non-configurable, non-enumerable }, there would have to be seven new tokens. I'm sure I'm not the only one who'd expect some confusion. Yes, keeping things brief is nice, but I'm not seeing a clear

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread T.J. Crowder
On Sat, Jul 8, 2017 at 8:09 AM, Raul-Sebastian Mihăilă < raul.miha...@gmail.com> wrote: > I'd like to propose the following syntax: > > ```js > const obj = { > x:| 3, // non-writable property with value 3 > y:] 4, // non-configurable property with value 4 > z:} 5 // non-writable

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread T.J. Crowder
On Sat, Jul 8, 2017 at 12:31 PM, kai zhu wrote: > -1 > as far as i'm concerned, const is a wart with surprising behavior > that should have never been introduced. best leave the wart as > is rather than add more surprises. I suggest re-reading more thoroughly. The `const`

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread kai zhu
-1 as far as i'm concerned, const is a wart with surprising behavior that should have never been introduced. best leave the wart as is rather than add more surprises. On Jul 8, 2017 3:09 PM, "Raul-Sebastian Mihăilă" wrote: > I'd like to propose the following syntax: > >

Re: Return value of forEach

2017-07-08 Thread T.J. Crowder
On Sat, Jul 8, 2017 at 1:40 AM, Michael J. Ryan wrote: > Woudn't Array.prototype.all satisfy those use cases, they run until a > falsy value is returned. > Is there an `Array.prototype.all` proposal? I'm not seeing it on github. If you're thinking of `every` and `some`, they

Syntax for non-writability and non-configurability

2017-07-08 Thread Raul-Sebastian Mihăilă
I'd like to propose the following syntax: ```js const obj = { x:| 3, // non-writable property with value 3 y:] 4, // non-configurable property with value 4 z:} 5 // non-writable non-configurable property with value 5 }; ``` Perhaps class fields could also use this syntax. Maybe decorators