
Отправлено с iPhone
Dec 20, 2011, в 14:40, Jesse Schalken
On Tue, Dec 20, 2011 at 9:34 PM, Gregory Crosswhite
wrote: On Dec 20, 2011, at 8:30 PM, Jesse Schalken wrote:
On Tue, Dec 20, 2011 at 8:46 PM, Ben Lippmeier
wrote: On 20/12/2011, at 6:06 PM, Roman Cheplyaka wrote:
In denotational semantics, every well-formed term in the language must have a value. So, what is a value of "fix id"?
There isn't one!
Bottoms will be the null pointers of the 2010's, you watch.
This ×1000. Errors go in an error monad.
Including all possible manifestations of infinite loops?
Definitely.
If you think a value might not reduce, return an error in an error monad. Then the caller is forced to handle the case of an error, or propagate the error upwards. The error can also be handled in pure code this way, whereas bottom can only be handled within the IO monad.
So... this imaginary language of yours would be able to solve the halting problem?
Cheers, Greg
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe