C is "pure" too.
The statement
puts ("hello");
is a "pure" value of type int.The statement
puts ("hello");
is a "pure" value of type int.The C equivalent of
putStrLn "hello"
is probably actually void putsHello(void) {
puts("hello");
}
Unfortunately, function definitions aren't something you can really manipulate at runtime in C.https://news.ycombinator.com/item?id=9085403
Haskell IO is severely misunderstood.