Mixing grammars

Peter van der Zee ecma at qfox.nl
Fri Sep 1 11:52:31 UTC 2017

> Sorry, but your message looks very opinionated and I can't seem to find any
objective reasoning in there.

Nah, you might be thrown off by the different grammar ;)


Thing is, `|>` would introduce a new way of calling a function in a
way that is not at all in line with how functions are called in JS.
That means JS devs won't easily recognize `a |> b` as easily as they
do `b(a)`. (Also consider less text-book-y examples here please...)

You might argue that this will be a transitional period and I will
counter you with an existential question; Why at all? What does this
solve? And is it worth the cognitive overhead?

I think this is a bad addition to the language. One that doesn't "fit"
with how the language currently works. And one that will lead to many
devs being thoroughly confused when confronted with this.

But, I'm not asking you to take my opinion on it. Research it. Please
do some research on this. Reach out to devs of all types (not just
react devs, not just functional programmers, not just vanilla JS
coders, not just code golfers, and definitely not just people on the
TC39) and figure out how they will respond when confronted with
additions like this. And please post those results here. I don't mind
being wrong. As long as you can back those claims up when introducing
something like this.

- peter

More information about the es-discuss mailing list