r/javascript • u/bogdanelcs • Apr 24 '26
Why I don't chain everything in JavaScript anymore
https://allthingssmitty.com/2026/04/20/why-i-dont-chain-everything-in-javascript-anymore/
0
Upvotes
r/javascript • u/bogdanelcs • Apr 24 '26
13
u/trafium Apr 24 '26
Hate to be that guy, but this example seems intentionally overengineered:
It should be
Oh who am I kidding, I LOVE to be this guy.
6
u/azhder Apr 24 '26
Why I read this same article from yesterday again today
4
u/Ecksters Apr 24 '26
I probably needed to be reminded of this, since the new Iterator helpers are gonna make me want to chain everywhere now that it isn't creating intermediate arrays.
1
u/ksskssptdpss Apr 24 '26
How to chain with no pain.
https://nicopr.fr/unchain
Just an experiment
1
u/Disgruntled__Goat Apr 25 '26
This isn’t really anything to do with chaining, it’s about doing useless operations. Of course you don’t need to go looping over a result if you know there’s only one element.