Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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




Maybe JavaScript's colored functions[0] were trying to tell us something

[0] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...


I 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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: