Shouldn't timers be specified?

Rick Waldron waldron.rick at gmail.com
Sun Jan 22 19:37:47 PST 2012


On Sun, Jan 22, 2012 at 10:29 PM, Brendan Eich <brendan at mozilla.org> wrote:

>  Rick Waldron <mailto:waldron.rick at gmail.com**>
>> January 22, 2012 12:50 PM
>>
>> This is a perfect use case for the forth-coming module system (similar to
>> the way Globalization is being developed). Dave Herman and I had a brief
>> "over Twitter" exchange that began with my desire for a migration of
>> parseInt and parseFloat to Math,
>>
>
> or Number -- IIRC, Crock proposed making better-behaved parse methods live
> there.


Number could work as well, but there are no other static methods on Number.
Math makes sense to me because Math is already in the business of doing
smart coercion...

Math.max("1", 0); // 1

// In my fantasy world...
Math.parseInt("1", 10); // 1



>
>
>  which I followed with a suggestion to do the same with setTimeout and
>> setInterval (despite those currently existing in the realm of DOM APIs) to
>> the imaginary Timer object.
>>
>
> Right :-P.


That part was mostly a snarky jab at myself for incorrectly thinking that
the existing timer functions were ES global object methods. whoops.


>
> /be
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120122/57779f9c/attachment.html>


More information about the es-discuss mailing list