News for hackers. Stuff that matters.
Re:Infinite work is less work by mikepurvis on Thursday July 11, 2019 @10:05AM (#20411577)
> However, as we stopped generating primes at 100, the &strong subroutine would have received an undefined value when it requested that n+1th prime. When used as a number, that undefined value would convert to zero, so the average of 97's two prime neighbours would be computed as (89+0)/2

I think I prefer Python's behaviour here, of just raising an OutOfRangeError, and not permitting NoneType to be coerced as an number.

Re:Infinite work is less work by donaldihunter on Thursday July 11, 2019 @12:18PM (#20412788)
Well Damian's program actually reports "Use of uninitialized value of type Any in numeric context" which the programmer can choose to be a warning or an exception.
Re:Infinite work is less work by X6S1x6Okd1st on Thursday July 11, 2019 @10:40AM (#20411839)
Yeah a lot of languages don't fall for the undefined should silently give valid results thing