Porting some code from OCaml to Scheme, the amount of boilerplate that goes away is staggering. Of course, I am also losing a whole lot of safety and refactoring help. But this sure makes the cost visible.
-
-
4. Again, no more monadic bullshit. ANF, gone. CPS, gone. Everything in direct style. I know where to find call/cc when I need it. 5. No more painfully converting from one monad (or absence thereof) to another. No more reinventing or failing to reinvent monad transformers.
-
6. No more packing and unpacking state in reader monads. Parameters provide a MODULAR way to handle dynamic scoping. 7. STATE IS MODULARITY. TO HELL WITH CONTAGIOUS NON-MODULAR EXPLICIT STATE-PASSING IN A MORONIC PRETENSE OF PURITY.
- 18 more replies
New conversation -
-
-
I'm curious why monads are such a big part of the code. In my experience, the fact that OCaml is not pure means you don't have to use monads. And without typeclasses and syntactic support monads are awkward, so most of the codebases I've seen don't treat effects monadically.
-
I was using monads a lot for Async work. I was also using the Error monad to propagate errors, the State monad to handle an actor's state. And I was planning on using the Reader monad to pass around configuration and database or server connections.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!