Frankie Bagnardi f.bagnardi at
Mon Jun 30 06:11:24 PDT 2014

It's pretty useless to have.  If you need the TAO constant often, rather
than setting it on Math you'd be better off having local variables.  This
is both for conciseness and minification (minified Math.TAO is Math.TAO,
minified TAO is a single character).

var PI = Math.PI, TAO = PI * 2;
var area = (r) => PI * (r * r)
var circ = (r) => TAO * r

Or even:

var π = Math.PI, τ = π * 2;
var area = r => π * (r * r)
var circ = r => τ * r

On Mon, Jun 30, 2014 at 2:58 AM, alawatthe <alawatthe at> wrote:

> Although I'm a mathematician, I don't want to argue from a mathematical
> point of view against the inclusion of Math.TAU
> (For this please read the which was
> already posted above by Michael).
> But instead from a JavaScript point of view:
> The only arguments in favor of Math.TAU so far were:
> Another +1. Would save me doing Math.TAU = 2 * Math.PI; at the top of all
> my trignometry files :-)
> That is not really a compelling argument for Math.TAU. And seeing the
> smiley I don't even think you meant it serious.
>    […] It's a fairly harmless easter egg.
> Yes, it is. But (apart from the question whether we should include easter
> eggs in the language)
> aren't there easter eggs, which have to do more with JavaScript and less
> with a pointless math argument?
> Are those really the two best arguments for Math.TAU?
> So now to the reasons against Math.TAU:
> I don't know a single programming language which includes the tau
> constant. Why should we?
> But the real reason why I'm against the inclusion of Math.TAU is the
> following:
> Brendan you said once that "Math is becoming a dumping ground" see here
> (So it surprised me much, that you want to champion Math.TAU at the next
> TC39 meeting.)
> I don't think that Math is a dumping ground (or becoming one), but I see
> no reason to include a property we don't need
> and make the Math object even more looking like a dumping ground to some
> people.
> Instead of tau we could add more useful things to the Math object like the
> gamma function and the error function.
> (I’m pretty sure that as soon as I propose those functions, someone will
> come with the dumping ground argument.)
> -- alawatthe aka alex
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list