A Matías Quezada amatiasq at
Thu Jul 3 06:02:02 PDT 2014

Extending host objects? I don't think that favors readability and

If I don't know TAU (or some one read my code and doesn't know it) and see
this I will look for Math.TAU on MDN, not on the project and if by chance I
guess it's defined somewhere in the project how will I know? there is no
reference to the file where the variable is created.

Sounds like create a global variable, we know the consequences this has for
readability and maintainability.

A. Matías Quezada
Senior Javascript Developer
amatiasq at

2014-07-03 9:47 GMT+02:00 Thaddee Tyl <thaddee.tyl at>:

> On Wed, Jul 2, 2014 at 5:52 PM, A Matías Quezada <amatiasq at>
> wrote:
> >  1. Use Math.PI * 2 everywhere
> >  2. Create a TAU constant on every file
> >  3. Create a TAU constant on a single file and require this file from
> > everywhere just for this
> 4. Do Math.TAU = Math.PI * 2 once somewhere. It even works in node.js,
> inside of the same process, leaking through require()s.
> And some do it:
> <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list