Hi!

On Jan 11, 2008 7:30 AM, Cristian Baboi <[EMAIL PROTECTED]> wrote:
> NaN is not 'undefined'

Why not? What is a semantic difference? I believe Haskell should use
undefined instead of NaN for all operations which are mathematically
undefined (like 0/0). NaN should be used in a languages which does not
support such nice Haskell features. Because if Haskell would use
undefined such error would propagate itself to higher levels of
computations, with NaN it does not.

if bigComputation > 1
  then ...
  else ...

Would be evaluating else semantically correct if bigComputation
returns NaN? No, it is not. With undefined this is correctly
(not)evaluated.


Mitar
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to