Re:Combinator Recipes for Working With Objects in JavaScript
by raganwald on Saturday December 15, 2012 @03:48PM
(#4926297)
I left "compose" out of this excerpt, but in the book:
[ Parent
| on HN ]
Re:Combinator Recipes for Working With Objects in JavaScript
by wonderzombie on Sunday December 16, 2012 @01:54PM
(#4929141)
Compose is another piece I wish more languages had. The functional style of small, orthogonal functions has changed the way I write code, but in many imperative languages, function composition as I know it just doesn't exist. And sometimes that disparity is a real bummer.
You can get close in dynamic languages, as with JS, Ruby, and Python. But if we're talking about Java or C++, it's just not happening, not without a bunch of work and not within an existing codebase where the introduction of new styles might actually be counterproductive.