News for hackers. Stuff that matters.
Re:Pipe Operator (|>) For JavaScript by wefarrell on Friday January 20, 2023 @01:06PM (#34457114)
Imagine that you asked someone the question "How do you make a cake?" Which response would be clearer?

1. Gather the ingredients, mix them in a bowl, pour into a pan, bake at 350 degrees for 45 minutes, let it cool off and then separate it from the pan.

2. Get ingredients by gathering the ingredients. Make batter by mixing the ingredients. Make batter in a pan by pouring the batter in a pan. Make a baked cake by baking the batter in the pan at 350 degrees for 45 minutes. Make a cooled cake by cooling the baked cake. Separate it from the pan.

For me personally #1 is more readable because #2 is unnecessarily bloated with redundantly described subjects.

Re:Pipe Operator (|>) For JavaScript by dalmo3 on Friday January 20, 2023 @04:31PM (#34460234)
Right, it works for your analogy.

Going back to the concrete scenario GP presented, naming things makes it much clearer to me.