3 ms·
> I read these sort of objections all the time and all I can think is that if we took the "change almost nothing about our tools - think of the juniors!" appro
by Zababa 5y ago
> I read these sort of objections all the time and all I can think is that if we took the "change almost nothing about our tools - think of the juniors!" approach advocated by these folks, we'd still be writing C and the industry would be an order of magnitude smaller than it is.
I don't think that's what those people mean. What those people mean is "if you want something else than JS, use something else than JS". If you want pipes, you can already use OCaml, ReScript, F#. They compile to JS and work well.
> Thankfully, the silent majority seems to understand this just fine, which is why despite the tenor of the conversation around these (and other) parts, our tools do continue to get better and better as the years go by.
Which is also why brain power is lost of things like this or the walrus operator in Python. JS is a fine compilation target. If you really like |> and JS, you can use a babel plugin! I don't see the point of adding it to the base language.
Maybe if people stopped always using the most popular option available, we wouldn't need to constantly add stuff to this popular option, and could have a rich and diverse ecosystem.
- ledauphin 5y agoI think this just fundamentally misunderstands how languages work in practice. In the vast majority of cases, switching languages is impossible, whereas picking up new words or idioms within the same language is very practical. And as far as I know, this will be in a future version of ECMAscript, which means that most people will in fact be using this via babel?
- Zababa 5y ago"Switching languages is impossible" is a self-fulfilling prophecy. You think you can't, so more stuff get added to the language, so it's less justified to switch, etc. And then you end up with people trying to use immutable structures in JS and having way worse performance (but there's records and tuples coming!). Many people that said that switching languages was impossible happily migrated to Typescript, because the migration was easy. You could do the same with something like ReScript, but instead of getting the codebase more and more strict like with TS, you would transform it more and more into ReScript. There's also often lots of opportunities for small greenfield projects/part of projects. > And as far as I know, this will be in a future version of ECMAscript This may be in a future version of ECMAscript. Stage 4 proposals are the one accepted, stage 3 are almost official. This one is stage 2.
- ledauphin 5y agoIt's not _just_ a self-fulfilling prophecy - there are other factors at play here beyond simply "X is good enough". But sure, the more that dominant languages try to pick up good features from other, better languages, the more they will tend to maintain their dominance. This is the way nearly all successful systems behave, incidentally. Please note that it's going to be tough sledding trying to convince JS users not to try to improve their language so that some other clearly superior language can come along and take its market/mindshare. And, well, yes, I realize we're talking about a future maybe-feature. That said, I assume you're granting my counter-point about how, no matter how you slice it, this is still ultimately "just a babel plugin"?
- Zababa 5y ago> Please note that it's going to be tough sledding trying to convince JS users not to try to improve their language so that some other clearly superior language can come along and take its market/mindshare. My point is that there's no "clearly superior language" compare to JS. Some people want a ML flavor, some people want a C# flavor, some people want a Lisp flavor. I wish people would just use those language and improve the interops instead of putting everything into JS.