On Thu, Aug 27, 2015 at 2:58 PM, Alexander Jones <a...@weej.com> wrote:
> Ethan is making my point far better than I did, and I agree completely about
> the issue of unary operators visually appearing more tightly bound than
> binary operators.
>
> At this point it seems fair to at least acknowledge the prospect of
> significant whitespace.
>
> ```
> -x**2 === -(x ** 2)
> -x ** 2 === (-x) ** 2
> ```

One kind of cost that I haven't seen mentioned (and is relevant
re:whitespace) is the impact on minifiers and other tools that use JS
as output, which have to deal with operator precedence/whitespace
rules in quite complicated ways.  There's a nice recent piece about
precedence bugs in a minifier:

https://zyan.scripts.mit.edu/blog/backdooring-js/

Making the creation and maintenance of systems like minifiers harder
is a real cost worth bearing in mind when updating already-subtle
existing rules.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to