by jashkenas on 9/14/21, 7:38 PM with 75 comments
by johnfn on 9/14/21, 8:40 PM
My suspicion is that once you move away from toy examples, most pipeline operator use cases are already covered by chaining class methods on classes. I suppose you could argue that the pipeline operator allows you to operate across multiple different data types, but I further suspect that handling many different data types with a single function is an annoying thing to get right and this won’t come up in practice all too often.
To be fair, the case of pulling in only the methods you need on rxjs seems somewhat useful… but do we really need a whole new operator just for that? And isn’t that the point of ::?
by Kaze404 on 9/14/21, 8:49 PM
by abecedarius on 9/14/21, 9:15 PM
by junon on 9/14/21, 9:10 PM
let v = first();
v = second(v, 10);
v = third(x, y, v);
return v;
Why do we need a new operator for this?by ibraheemdev on 9/14/21, 9:37 PM
1.. |> take 10 |> map {|e| e*2} |> (x)
> After experiments, |> have caused more confusion and controversy far more than I expected. I still value the chaining operator, but drawbacks are bigger than the benefit. So I just give up the idea now. Maybe we would revisit the idea in the future (with different operator appearance).by ranguna on 9/15/21, 7:13 AM
Understatement of the year, that's the worst token I've seen in all my years of working with javascript and I hope it doesn't go through.
by rk06 on 9/15/21, 10:13 AM
if pipe() works for RxJs, and hackpipe is not better, then why don't you simply stick with pipe()?
Just because one operator is there, doesn't mean you have to use it.
JS classes are notoriously under powered, so much that both react and vue prefer functions over class components
Besides, it is possible that RxJs (and other libraries) may modify how they work to better utilise hack pipe
by jasperry on 9/14/21, 9:15 PM
by nsonha on 9/14/21, 9:08 PM
I went through the github issue the other day, syntax aside, the two proposal boil down to functions vs expressions (no extra functions)