Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-20 Thread Phillip Lord
Julian juliangam...@gmail.com writes: My question is - have other Clojure/Haskell programmers had this experience? (ie I rarely find myself reaching for something like the state monad). I'm interested to hear if so, and why. I find myself reaching for the state monad all the time; then I

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 16, 2014, at 8:49 PM, Julian juliangam...@gmail.com wrote: A quick shoutout to the Clojure Community - thanks for the way you've all contributed to make my life (mentally) richer. James Reeves (author of Compojure and many other wonderful libraries) made this interesting comment

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on occasion (and would have sometimes refrained from using them where I'd naturally lean to doing so solely to avoid creating an dependency). For instance,

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison hutch-li...@recursive.cawrote: Haskell's STM transactions can be thought of as a form of IO action (like reading a file is an IO action) that modify refs (there are no atoms in Haskell, only refs). A transaction must be started in the IO monad

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:44 PM, Ben Wolfson wolf...@gmail.com wrote: I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on occasion (and would have sometimes refrained from using them where I'd naturally lean

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:50 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison hutch-li...@recursive.ca wrote: Haskell's STM transactions can be thought of as a form of IO action (like reading a file is an IO action) that modify refs (there are no atoms

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Ben Wolfson
On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison hutch-li...@recursive.cawrote: On May 19, 2014, at 1:44 PM, Ben Wolfson wolf...@gmail.com wrote: I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 2:45 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison hutch-li...@recursive.ca wrote: I badly miss the Maybe and Either monads, but would want the syntactic support Haskell provides (which I can't see will ever be available in

in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-16 Thread Julian
A quick shoutout to the Clojure Community - thanks for the way you've all contributed to make my life (mentally) richer. James Reeves (author of Compojure and many other wonderful libraries) made this interesting comment on Hacker News: Clojure has libraries that implement monads, but these

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-16 Thread Timothy Baldridge
When I first wrote the core.async go macro I based it on the state monad. It seemed like a good idea; keep everything purely functional. However, over time I've realized that this actually introduces a lot of incidental complexity. And let me explain that thought. What are we concerned about when