Settings

Theme

Interesting languages and their selling points

pema.dev

6 points by overlisted 4 years ago · 1 comment

Reader

Laaas 4 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection