DEV Community

loading...

Look for Nuke Launchers in Haskell

Yufan Lou
Learning Rust and Haskell, tired of JavaScript. Thinks Ruby is awesome except that it is not cross-platform enough. 日本語 / 中文 OK. He/him.
・1 min read

Haskell programmers like to tell people that in other languages if you use some library and that library launches a nuclear missile, you wouldn't know.

Turns out you wouldn't know necessarily in Haskell either. If you use any significant framework, there is a good chance you use its provided monad stack, which if contains IO, can launch a nuclear missile.

To this end, IO in Haskell is like unsafe in Rust. It significantly reduces audit surface, but you still need to be vigilant to audit it. Perhaps not surprisingly, the way Rust markets its safe subset is similar to how Haskell markets its pure subset.

Stay vigilant.

Discussion (0)