by walrus · 14y ago · 0 comments
That isn't controversial nor is it an opinion. It's just the truth. Purely functional code has no side effects. The entire point of a program is to have side effects.
This is one of several ways that Haskell worked before there was an IO monad [1], all allowing pure functional useful programmes.
[1] S. Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in haskell. Technical report, Microsoft Research, Cambridge, 2010.
My purely functional programs actually do things! Amazing that my ivory tower allows me to say "Hello World".
For non-interactive use (like a compiler) you could implement the program as a function taking and returning a string.