Re:Readability and Naming Things
by joe_the_user on Wednesday January 26, 2011 @02:49PM
(#2144771)
That's a nice simple explanation of the points-free style, thanks!
But still, I don't feel like this approach would become useful unless/until you reached the point that it could condense a two-line formula into one line (ei, five or six applications further).
I strong suspect that in that case you'd have the kind of formula you only grasp at a glance after you'd working with it intensively for a while.
And this gets into the realm of "write only code" - code too compressed for anyone but it's original author to approach.
If your names are merely for binding (e.g: f(x) = .. x ..) and don't contribute much, then getting rid of them can be helpful. In Haskell, you can use "points-free" style to get rid of names like that. For example, you can replace:
With: