From Haskell to Java: modeling your problem domain with types
lendup.comNeat article! Coming from a Haskell background in my first post-college job, I also modeled several problems using Haskell types and later translated them into C++.
It felt a little silly at first, but really did help clarify my understanding of the problem domain and let me play around with composing and operating on data structures very quickly in an interactive REPL. Once I was happy with the data structures and had a good understanding of the most complicated operations over them, it was a simple task to build the analogous C++ classes.
I used this on a project. Had a complex business logic I rewrote from Java to Haskell so we could understand the edge cases. Worked out great. Don't be shy about using Haskell as a specification language.
It's an interesting idea, but the example is essentially an implementation of the visitor pattern so make sure that is really what you want before following suit.
This post was really good, it proves the point of learning an esoteric language and skills for a mainstream technology. I wish I could read more posts like this one.