Re:What are potential disadvantages of functional programming?
by jfoutz on Thursday July 27, 2017 @10:43PM
(#14871538)
I was going to link the same article!
I think the interesting part is the similarity between haskell and clojure. Essetially programming to very small classes/protocols. The linked article is cool, because i think the java approach would generalize to the OP's C++ solution, and be able to eliminate that gross dynamic cast.
Here's a post on solving it using type classes in Haskell, if people are curious! http://koerbitz.me/posts/Solving-the-Expression-Problem-in-H...