Re:An Experiment in Purely Functional IO for Clojure
by im3w1l on Sunday April 19, 2015 @03:19AM
(#9402316)
Hmm I wonder if that loop example can be rehabilitated. If we interpret it, not as a description of how to evaluate loop, but rather as a constraint on loop. Then we see that the statement is simply a non-condition on loop.
This would mean that non-termination is not a property of the function, but of the compiler/runtime, in that they failed to notice that loop was a partial function called with an input value for which it was not defined!
Re:An Experiment in Purely Functional IO for Clojure
by tel on Sunday April 19, 2015 @10:47AM
(#9403316)
That's probably possibly in this particular case but it sounds a lot like you're heading toward Halting Problem territory here :)
If your notion of equality differentiates "println" and "constantly_unit" then we cannot call "println" pure.
Note that this is a very powerful notion of purity. It's so powerful as to render Haskell impure as if we have the function
then `loop >> constantly_unit` never returns and is therefore easy to distinguish from `constantly_unit` itself. This just drives home that non-termination is an effect itself!