4 ms·
In the rare cases that a programmer actually needs (dynamic) function composition, yes. For very understandable reasons, most of the examples you see of higher
by mencius 19y ago
In the rare cases that a programmer actually needs (dynamic) function composition, yes.
For very understandable reasons, most of the examples you see of higher-order FP languages tend to stress very intricate and elegant algorithms. But what is 99.999% of the actual functional programming that is actually done in the world? SQL and Web template transforms. About as intricate as a brick.
The result of having these incredibly high-powered, high-strung thoroughbred FP languages is that no one even thinks of these mundane tasks as cases of functional programming. But of course they are. FP is the natural generalization of declarative programming.
The real tragedy of Haskell is that, if the people who designed Haskell had actually been working on, say, XML and XSLT, XML and XSLT would not suck nearly so much.
I repeat that in almost all cases, dynamic construction of functions is unnecessary and can be eliminated. Otherwise, yes: write even more functions and pass around lists of function pointers.
But you're right that I could probably make the same point in a much less vitriolic way. Blame acid reflux.
- steveOfAR 19y ago> f the people who designed Haskell had actually been working on, say, XML and XSLT, XML and XSLT You might want to check out SXML / SXPATH/ SXSLT. These definitely don't suck, in fact I'd consider them nothing less than "XML processing done right". They are created by a well known type-system wizard (Oleg) with a fondness for Haskell.