The Point of Pointfree

Albert Y. C. Lai, July 3, 2004
trebla [at] vex [dot] net

What makes Unix shell scripting special?

Sample Unix shell command:

  grep '^X-Spam-Level' | sort | unique | wc -l
Sample Haskell function:
  length . nub . sort . filter (isPrefixOf "X-Spam-Level")
(isPrefixOf and nub are from the Data.List module)

<sarcasm>
Pointfree combinator programming is very intimidating, abstract, and is no more than a theoretical curiosity --- you always put the points back in real programs. Unix shell pipelining is very intuitive, down-to-earth, and is a matter of bread-and-butter --- it is impractical to create, track, and clean up temporary files in real applications.
</sarcasm>


This was part of a post on comp.lang.functional (Google copy).


Go to Weblog of Albert Y. C. Lai