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

One alternative is STM, software transactional memory which is modular and composable. I think Haskell was first to implement it but its also in Clojure and some Scala libs.

This is what ZIO's type safe version looks like https://zio.dev/reference/stm/ Scala's for-comprehension is syntactic sugar for calls to flatMap, map, and withFilter, similar to Haskell's do-notation.



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

Search: