News for hackers. Stuff that matters.
Re:Grain: A strongly-typed functional programming language f... by recursive on Tuesday July 31, 2018 @12:06PM (#17654379)
> I think JavaScript simply got it quite wrong by trying to be way too clever. In theory it is fine to say that dividing by 0 is Infinity but ...

This wasn't javascript's idea. They're just following the spec. https://en.wikipedia.org/wiki/IEEE_754#Exception_handling

Re:Grain: A strongly-typed functional programming language f... by galaxyLogic on Tuesday July 31, 2018 @11:04PM (#17659328)
This IEEE spec is about Exceptions like exception for division by zero. As far as I can tell dividing by zero in JavaScript does not cause an exception, does it?
Re:Grain: A strongly-typed functional programming language f... by recursive on Wednesday August 01, 2018 @11:26AM (#17663343)
Yes, it does. And the result of that exception produces a signed infinity, unless the numerator was zero. Note that this is different than the language-level Error construct that can be thrown and caught.