3 ms·
Premise 4: Your type system can't tell the difference between "null" and 0. Adding 4 and null also makes no sense, yet 4 + 0 is perfectly fine. > Conclusion:
by IanCal 13y ago
Premise 4: Your type system can't tell the difference between "null" and 0.
Adding 4 and null also makes no sense, yet 4 + 0 is perfectly fine.
> Conclusion: Null indexes that are architecturally invalid to use are a good thing, because you can catch bugs involving their use immediately.
Recommendation: Have a good type system.
>>> a = [1]
>>> a[None]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not NoneType