8 ms·
Haskell practically encourages this style of programming. Any function that touches IO needs to wrap outputs with an appropriate monad. It becomes easier to pus
by droningparrot 11mo ago
Haskell practically encourages this style of programming. Any function that touches IO needs to wrap outputs with an appropriate monad. It becomes easier to push all IO out to the edges of your program and keep your core purely functional with no monads
- kaashif 11mo agoI wish that's what people did, some codebases I've seen are messes of monad transformer stacks the likes of which you've never seen. I mean, what if you want to do IO and have mutable data structures inside a do block? I'm afraid I'm going to have to prescribe you a monad transformer. Be careful of the side effects.
- kmeisthax 11mo agoMaybe JavaScript's colored functions[0] were trying to tell us something [0] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...