Re:When Does Point-Free Notation Make Code More Readable?
by harunurhan on Friday September 29, 2017 @10:16AM
(#15365440)
I disagree, I don't know may be it's a preference thing but I think the code with points is readable for me and doesn't require to write extra function, class etc.
[ Parent
| on HN ]
Re:When Does Point-Free Notation Make Code More Readable?
by avmich on Friday September 29, 2017 @11:04AM
(#15365905)
A hallmark example of point-free style in J is likely the example of calculating the average value of the array:
+/ % #
Here literally you say "I'm calculating sum of elements (+/) which then divide (%) into the number of elements (#)".
If your array isn't just a one variable (x) but instead is obtained as a result of an expression, you may not want to repeat that expression twice or to invent an intermediate variable to store the array result. Here point-free style can help.