Alex Kocharin (2014-01-15T20:22:34.000Z)
What if we add a uint64 type, we'd just have Math.clz64 (which is better than have X.clz returning something depending on a type, so you always have to check the type first)


15.01.2014, 23:18, "Jason Orendorff" <jason.orendorff at gmail.com>:
> ES6 adds a clz function, but it's a method of Number.prototype.clz
> rather than Math.clz.
>
> The rationale for this decision is here (search for clz in the page):
>   http://esdiscuss.org/notes/2013-07-25
>
> Can we reverse this, for users' sake? The pattern in ES1-5 is quite
> strong: math functions go on the Math object.
>
> The rationale (What if we add a uint64 type?) doesn't seem compelling
> enough to justify the weirdness of the result: we'll have a single
> mathematical operation available only as a Number method, and all
> others available only as Math functions.
>
> -j
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
domenic at domenicdenicola.com (2014-01-23T19:51:25.252Z)
What if we add a uint64 type, we'd just have Math.clz64 (which is better than have X.clz returning something depending on a type, so you always have to check the type first)