Why monads have not taken the Common Lisp world by storm (2008)
marijnhaverbeke.nl
Why monads have not taken the Common Lisp world by storm (2008)
1–10 of 49 posts
Re: Why monads have not taken the Common Lisp world by storm (2008)
#2Re: Why monads have not taken the Common Lisp world by storm (2008)
#3I [author] must say I'm slightly embarrassed to see this turn up here now. This is not a terribly deep or interesting post. Read http://marijnhaverbeke.nl/blog/tern.html or http://marijnhaverbeke.nl/blog/acorn.html or http://marijnhaverbeke.nl/blog/browser-input-reading.html instead.
Re: Why monads have not taken the Common Lisp world by storm (2008)
#4In the simpler cases where use of monads can be replaced by simple mutable state -- you still lose out on the explicit types of the mutating vs. pure code.
For example, STM is possible because mutating effects are typed, and so can be ruled out of STM transactions.
And in the more complex monads (e.g: transformer stacks), mutable state is just not good enough. You can compose transformers to build things that mutable state simply cannot express, and you'd have to CPS transform your code and avoid mutable state to express those things.
For example, these two monads:
ListT (ParsecT m)
ParsecT (ListT m)
Have no corresponding "mutable state" representations.Re: Why monads have not taken the Common Lisp world by storm (2008)
#5I [author] must say I'm slightly embarrassed to see this turn up here now. This is not a terribly deep or interesting post. Read http://marijnhaverbeke.nl/blog/tern.html or http://marijnhaverbeke.nl/blog/acorn.html or http://marijnhaverbeke.nl/blog/browser-input-reading.html instead.
Re: Why monads have not taken the Common Lisp world by storm (2008)
#6Oh yeah, incredibly ugly \s
OP, you may be interested in checking out LiL, the Lisp interface Library.
Re: Why monads have not taken the Common Lisp world by storm (2008)
#7I [author] must say I'm slightly embarrassed to see this turn up here now. This is not a terribly deep or interesting post. Read http://marijnhaverbeke.nl/blog/tern.html or http://marijnhaverbeke.nl/blog/acorn.html or http://marijnhaverbeke.nl/blog/browser-input-reading.html instead.
Don't be. The fundamental observation that monad's usability is tied closely to Haskell's features is important, and still hasn't been taken on board elsewhere. There's always someone trying to do monads in Clojure...
Re: Why monads have not taken the Common Lisp world by storm (2008)
#8 getAny :: (Random a) => State StdGen a
getAny = do g
I was like.. how on Earth Haskell knows which function "get" should it call? I think this is a point which should be more stressed in the tutorials (I read Learn yourself a Haskell and glanced at couple of others..)Re: Why monads have not taken the Common Lisp world by storm (2008)
#9Earlier quoted context omitted.
Don't be. The fundamental observation that monad's usability is tied closely to Haskell's features is important, and still hasn't been taken on board elsewhere. There's always someone trying to do monads in Clojure...
Scala has plenty of monads and they work fine.