3 ms·
The other thing I'd add into something like this is, by analogy, objection orientation is all about binding data to functions and calling it a "method", but wha
by jerf 16y ago
The other thing I'd add into something like this is, by analogy, objection orientation is all about binding data to functions and calling it a "method", but what it's really about is what you then build out of that, like the classic Design Patterns. When you program in OO, you don't sit here thinking to yourself "OK, I'm calling a method, wooo! OK, I'm calling another method! Wooo!"
Similarly, this is just the baseline stuff, the really interesting stuff comes out of what you build from that, which varies depending on the precise flavor of functional you are talking about. What's really interesting is what you build out of this stuff; you hardly ever sit there and go "Wooo, I'm mapping! Wooo, I'm reducing! Wheeee!" In fact you can write a lot of Haskell without ever writing the (local equivalent of the) word "reduce" or "filter" because you're always actually using something using that under the hood. (map I do end up using directly with some frequency. And I'm not saying I never use fold or filter directly, but it is often actually under the hood somewhere while you use something yet more declarative.)