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

You don't do away with them, you differentiate between side effectful functions and pure functions. One way to do this is tag them with the type IO. This would be a great pain if there weren't helpful ways (see Monad, Functor, and Applicative) to apply pure functions to them.

You also get the benefit that those side effects have a set of laws to govern their behavior in failure cases.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: