3 ms·
A little off topic, but I wanted to thank you for your comment ‘..delimits a stateful computation which can then be embedded in a pure one in a principle way’
by mark_l_watson 9y ago
A little off topic, but I wanted to thank you for your comment ‘..delimits a stateful computation which can then be embedded in a pure one in a principle way’
I always think of it the other way around: I write pure code, and then embed the pure code in IO, etc. I tend to have boilerplate bits of impure code that I use as an after thought once I have pure code written and tested in a repl.
I think that to progress, I need to swap my view of Haskell, and spend much more time on the impure parts, and earlier in my dev process.
- gowld 9y agoThen you look at professional code written by the famous experts, and you see almost everything is written inside an app-specific ReadWriteStateIO monad.
- lmm 9y agoMost apps do things. But most apps don't do everything. Of course most business code is written in domain-appropriate monads that express some set of effects; why would we expect anything different?