I'm sorry David, I just have to express a dissenting opinion here. While I
could see that "better tooling!" would be a positive side-effect of some
syntax suggestions, I think it's a overreaching idea to consider such a main
argument for adding new syntax.
You make a compelling argument of how tooling *could* benefit from the new
syntax, sure. But it misses a few things:
1. The readability of the language in environments where such tooling
doesn't or can't really exist.
2. Syntax highlighting of 1-2 char operators is far less visually helpful
than syntax highlighting of method names, etc.
3. Not all developers use a unified toolset for JavaScript (compared to say
.NET where the vast majority use VS)
For #1, I personally think |> looks awful. I hate it. I wouldn't use it. And
I'm less than entranced by the idea that I might have to read others' code
with such confusing looking operators in it. Only if all the tools I was
using to read & write JS were capable of somehow making that syntax
useful/beautiful instead of ugly would your argument hold much water for me.
But that's just opinion and preference.
For #2, which kinda goes with #1, I'm concerned that the readability (even
with syntax highlighting) of the language as a whole will take a dip for
several years as developers re-adjust to the new syntax. Syntax highlighting
is often seen as a way to help the readability of a language, but syntax
highlighting for new weird unfamiliar operators isn't going to help much at
all.
Will it eventually get better? Sure, if we don't keep adding new syntax
every edition, it'll eventually stabilize. But I don't look forward to the
dip in readability for the short-term, for my own code and for everyone
else's code that I read.
For #3, I don't use fancy IDE's at all. I use text editors at best. I use
notepad, PSPad, and Sublime on windows. And on linux I use vi. I doubt any
of those text editors are ever going to care to pick up on the syntactic
nuances you suggest. Which is my bigger point. Just because tooling *CAN*
benefit from new syntax, doesn't mean all (or even most) tooling *WILL*
benefit. What we'll end up with is a broad range of support from none all
the way up to super-awesome-happy-unicorns. So both the good and bad side of
this is YMMV.
Factoring all those things in, I can't see how "new syntax==better tooling"
is anything more than an auxiliary supporting argument.
And yeah, I concur with the "99 problems..." statement. Working with
JavaScript every day for the better part of a decade, I can't say that
JavaScript's syntax issues have ever really tripped me up. Poor API's trip
me up all the time. Poor handling of async (which can be considered a syntax
issue!) definitely trips me up regularly. But raw operator syntax for common
tasks is rarely something that shows up on my radar. There are SO MANY other
things I wish JavaScript would address first.
Just my 2 cents.
--Kyle
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss