Math.TAU

Rick Waldron waldron.rick at gmail.com
Mon Jun 30 10:37:00 PDT 2014


On Mon, Jun 30, 2014 at 1:26 PM, Andreas Rossberg <rossberg at google.com>
wrote:

> On 30 June 2014 19:01, Rick Waldron <waldron.rick at gmail.com> wrote:
> > On Mon, Jun 30, 2014 at 10:27 AM, Jan Keromnes <jan at mozilla.com> wrote:
> >>>
> >>> 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:
> >> https://github.com/search?q=%22Math.PI*2%22&ref=searchresults&type=Code
> >
> > Probably not-so-coincidentally, I have almost the same search url saved
> in
> > notes I'm preparing for discussion at the next TC39 meeting. If you
> remove
> > the "Math." part, there are 20,288 more matches:
> > https://github.com/search?q=%22PI*2%22&type=Code&ref=searchresults if
> you
> > add spaces between PI, *, 2 there are over 3000 more matches. When the
> parts
> > of the term are flipped around as "2*PI":
> > https://github.com/search?q=%222*PI%22&type=Code&ref=searchresults
> (137,134
> > matches for those that don't want to click). Then variations of
> "math.PI",
> > "Math.PI" with or without spaces will yield several thousand more for
> each.
>
> Come on. By that metric, we should immediately introduce a toplevel
> binding `OP` as a synonym for Object.prototype, because a gazillion
> lines of JS code out there contain it -- that would actually save 14
> characters each, as opposed to 1 for Math.TAU.


If I were arguing for `MP` as a synonym for `Math.PI` then this argument
would hold, but I'm not so it doesn't.

And we could probably
> come up with 100 more constants and abbreviations of equivalent
> utility in less than 3 minutes.
>

We're not talking about simple abbreviations.


Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140630/286a73f4/attachment.html>


More information about the es-discuss mailing list