4 ms·
Saying that Monad should be used instead of frameworks, because frameworks don't compose? Monads don't compose, and the workarounds are ugly and still a topic
by kod 10y ago
Saying that Monad should be used instead of frameworks, because frameworks don't compose?
Monads don't compose, and the workarounds are ugly and still a topic of active research.
- mavelikara 10y agoI can't upvote this enough. <rant> I want to use PFP techniques. I have debugged numerous bugs after which I wished that the return type of a function encoded the effect the function has. But, boy, do they make it hard?! I really do wish that PFP advocates stop deluding themselves and make a better pitch for why and how what they advocate be used by the industry. The first version of Wadler's "Monads for Functional Programing" [1] paper came out in 1992. The paper "Monad Transformers and Modular Interpreters" [2] came in 1995. Swiestra's free monad paper [3] was published in 2008. The Eff Monad paper [4] came in 2013. Think of all the advances computing has made since 1992. Programmers in the industry have worked hard equipped with their tools deemed primitive. Hell, people have caused real world revolutions armed with nothing but PHP. Yet, the PFP folks haven't gotten around to compose multiple effects in any sensible fashion ... since nineteen ninety two! But that has not stopped them from pointing out with derision how everyone else is doing it wrong. > It is imperative to understand that the need for composability in our software tools is an absolute requirement. If we as an industry have any hope of not repeating ourselves time and time again, we have to change our ways. Yeah, right - and which decade can we expect the PFP solution to be delivered? </rant> [1]: https://cse.sc.edu/~mgv/csce330f16/wadler_monadsForFP_95.pdf https://cse.sc.edu/~mgv/csce330f16/wadler_monadsForFP_95.pdf [2]: http://haskell.cs.yale.edu/wp-content/uploads/2011/02/POPL96-Modular-interpreters.pdf http://haskell.cs.yale.edu/wp-content/uploads/2011/02/POPL96... [3]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101.4131&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101... [4]: http://okmij.org/ftp/Haskell/extensible/exteff.pdf http://okmij.org/ftp/Haskell/extensible/exteff.pdf