Bringing setTimeout to ECMAScript
jorge at jorgechamorro.com
Sun Mar 20 14:56:35 PDT 2011
On 20/03/2011, at 21:30, Dean Landolt wrote:
> On Sun, Mar 20, 2011 at 4:05 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> It's the one browser makers have all implemented.
> The key word here is "browser makers". Maybe node's process.nextTick is a footgun,
It isn't a footgun, it's a necessity for example for long-running tasks that shouldn't block the event loop. Either a nextTick() or a non-clamping setTimeout( f, 0 );
> but it's one you'll need if you want to roll your own scheduling, for instance.
> Apparently there is real evidence that clamping in setTimeout is necessary but that doesn't mean it makes sense as a language construct.
It doesn't, so we're going to need a non-clamping alias. Perhaps an [ugly] setTimeout ( ƒ, -1 ) ?
More information about the es-discuss