Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Interesting languages and their selling points (pema.dev)
6 points by overlisted on July 30, 2022 | hide | past | favorite | 1 comment


One thing the author fails to mention, is that monads can't _annotate_ the terms. They can not replace effects in the type system, since something `putStrLn` doesn't _cause_ an effect, it _returns_ it. In a strict language, even if you have something like `putStrLn :: String -> IO ()`, you can not do `let _ = putStrLn "d" in x` and have it not print it, unless `IO` wraps the computation in a lambda, which is quite suboptimal.

Hence, monads are not a replacement for effects, even if people are making things like https://github.com/haskell-effectful/effectful/.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: