Re:A proposal for adding a pipe operator to JavaScript
by chrisco255 on Tuesday October 19, 2021 @12:51PM
(#28920313)
You're mutating result every step along the way and passing it into the functions as well, such that if it's an object or an array it could be mutated in non-transparent ways. The main benefit is to encourage a more functional, immutable data flow.
[ Parent
| on HN ]
Re:A proposal for adding a pipe operator to JavaScript
by thomas_moon on Tuesday October 19, 2021 @01:04PM
(#28920496)
I get your point but I guess I fail to see how more obscure syntax at the time of composition helps someone understand something should be immutable. If I'm mutating inputs in a functional programming code base, syntax probably isn't the problem.
edit: wasn't to isn't