
Luke Palmer wrote:
The idea being that any code that is pure could be evaluated anywhere with a very simple interpreter. If you have pure code, you can trace it back and evaluate it in a sandbox where you don't need a C runtime, a linker, or really anything but the simplest substitution engine. *All* effects bubble their way up to the top level, so that we know from the type signature of a value the machinery we will need to run
The alternative is not much better: syntactic sugar (say a "wrapping" keyword similar to "deriving") that wraps up a pure type in a State, ST, or IO. The inevitable result is that *every* type from the lazy programmer will be so wrapped. Many programmers overdo the IO monad as it is. With suitable sugar, they will become addicted! Dan