News for hackers. Stuff that matters.
Re:Null References: The Billion Dollar Mistake by perl4ever on Wednesday January 15, 2020 @01:02AM (#22052066)
That seems (although I don't have experience with either language) straightforwardly correct treatment in Python and wrong in Ruby, and the problem seemingly should be attributed to [lack of] range checking, not nil/null.
Re:Null References: The Billion Dollar Mistake by philwelch on Wednesday January 15, 2020 @01:47PM (#22057098)
Sure; in this case, range checking provides an alternative behavior to generating a null reference. But Ruby has other places where it generates null references more promiscuously than Python. Java does too. If you take every use case that could generate a null reference and instead behave differently in that situation you’ve eliminated null references, and Python has largely done so despite having a None type.