News for hackers. Stuff that matters.
Re:`no-pipe` ESLint rule by eimrine on Tuesday September 20, 2022 @03:45PM (#32916820)
> Do you want your child to learn to code using "Hello, World!" |> console.log(%);?

Considering they already know how to use pipe operator in bash, why not? I have read one article about some JS proposal (sorry can not found the link) and the punchline was about not turning JS into trapedy of Common Lisp - that sounded to me significantly more convincing.

Re:`no-pipe` ESLint rule by arendjr on Tuesday September 20, 2022 @04:10PM (#32917134)
At least Bash doesn’t have that hideous topic selector

I would be sympathetic if it were purely `”Hello, World!” |> console.log`. I still wouldn’t use a pipe in such a trivial case, but at least it’s not really worse. But with the topic selector that example has strictly more concepts you need to understand than the example without pipe. From an educational perspective that’s already not great, but what’s more worrisome is that proponents tend to suggest the pipeline should be used wherever you can, despite simultaneously “knowing” when not to use it and ignoring examples where you cannot use it due to multiple subjects being composed.

It’s not the pipeline in general that I’m against, but I’m very opposed to this “let’s-add-a-third-syntax-to-compose-arbitrary-expressions-Hack” proposal.