The question of how to use functional coding in a larger system design is finally becoming clear to me. Just as the Spring framework took several key patterns and made things easier for J2ee developers, I can see Free Monads and Aplicatives doing the same things for the functional world. The key pattern in Spring, and one I have used extensively in my own development, is the template pattern. As I am reading more on Free Monads and Free Applicatives, I can see that the DSLs that they let you create are kind of like the template pattern on steroids. Just as with the template pattern, you can define data flow at a high level and leave the detailed implementation to the interpreter. Being able to combine alegebras and interpreters into larger systems is where the steriod part comes in. I can see this fitting well into an evolutionary type of design process where the key ideas bubble up into the DSLs for your system. Furthermore, having the ability to have more than one interpreter for each DSL could enable things like canary releases. Projects like Freestyle http://frees.io may be the killer enabling technology for the functional coding paradigm.
No comments:
Post a Comment