News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.