jan at mozilla.com
Mon Jun 30 07:27:28 PDT 2014
> I'd just like to add that "joke requests" like Math.TAU that have no
> place in the language specification itself generate a considerable
> amount of overhead for those of us who keep up with the mailing list.
I don't think asking for Math.TAU was a "joke request". It's rather a
request for a convenient short-cut to the value `Math.PI * 2`, of which
the utility and judiciousness can be debated. Sorry if I'm adding noise
to this less-interesting thread, but I feel the issue is being
dismissed without adequate consideration. I'm looking forward to
Brendan championning it at the next TC39 meeting, so that we can accept
or dismiss it with a proper review.
My take is that having Math.TAU would end this kind of madness:
The gains would admittedly be small:
- Using `Math.TAU` instead of `Math.PI * 2` is only slightly more
handy, and would benefit a limited number of developers,
- The unnecessary constant multiplications are trivial to optimize,
- We would save 50 KB of code across all GitHub repositories,
- Or 16 bytes in the minified version of the popular http://threejs.org
But they might be worth the negligible implementation and maintenance
Here is a proposed implementation of Math.TAU in the Firefox runtime:
On Mon 30 Jun 2014 03:16:18 PM CEST, Benjamin (Inglor) Gruenbaum wrote:
> Especially since the other topics discussed are interesting (e.g.
> ModuleImport ). I think it would be best if we refrain from them in
> the future as this mailing list is already noisy.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss