Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why Python uses 0-based indexing. It's because of slices . Parent comment
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
There are no comments on this comment yet.
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.