On Thu, Mar 18, 2010 at 12:44 AM, Dhanji R. Prasanna <[email protected]>wrote:

> On a slightly unrelated note, I take issue with the insinuation that
> Functional languages do not do the strategy pattern well. I'd say higher
> order programming achieves the same goal, and somewhat more elegantly than
> the strategy pattern.
>
> Dhanji.
>

I'm either missing some key pattern in the FP pattern book, or it's a matter
of taste: I find this kind of solution awkward.  In the
single-method-on-strategy case, it is cleaner, but in the
multiple-method-on-strategy case you end up reinventing OO dispatch in a
probably-non-standard way.  Hmm, I suppose you can work around this in
languages that have pattern matching or another way to unroll return
values.  I find Haskellian classes a very neat functional solution for
polymorphism, but this comment was a sort of good-natured, sideways jab
intended to be caught by some cow-orkers singing the "silver bullet" refrain
with "Clojure" in the "<insert-pattern-or-technology>" slot.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to