by dddbbb · 6y ago · 0 comments
1 / 0 :: Double
evaluates to Infinity. 1 / 0 :: Rational
throws a runtime exception. A division by zero producing zero would be perfectly sensible in Haskell, and perhaps even desired if you are totally averse to runtime errors. The Pony language infamously does this.No comments yet.