|
|
|
|
|
by Miky
5316 days ago
|
|
It makes me sad that having monad sugar is now just a given feature for a functional language. Especially when that language has unrestricted side effects and the example code using the monad syntax uses those side effects, completely obviating the need for, and in fact rendering useless, monads as used in the example. This is cargo cult programming at its worst. Including monad sugar because it's the thing to do, without even understanding what monads are or why they're useful. This is quite clear from the "tracing monad" example code. This "tracing monad" is like the Writer monad, stripped of all utility and sense. What drove you to unleash this horror on the programming masses, Moggi? Why have you cursed us so? |
|
I didn't add monadic sugar just to be part of the "cargo cult". I added it because I'm eventually going to use it to implement an automatic continuation-passing transform. I've done a similar thing before with ClojureScript's macros:
http://brianmckenna.org/blog/cps_transform_js