Comment by UqWBcuFx6NV4r

16 days ago

[flagged]

I don't know man. It's just zero. Dereferencing it just crashes your program (assuming an operating system). This kind of just reads like a fear of pointers. Corrupted/out-of-range pointers are, at least, a real problem.

Is None OK in Python?

NULL in C just doesn’t belong at the end of a string. But IMO having a “there is no value here” designation is not a bad thing.

  • Python is interpreted so None is always tested for and will throw an exception if used in the wrong context. This is quite different from a SEGVIO.

    > But IMO having a “there is no value here” designation is not a bad thing.

    Sure ... if it's done via the type system so that errors are caught at compile time. There's a reason that modern languages all either do this or are moving towards doing it. (And a reason that C programmers have no idea what we're talking about when we refer to type systems.)

    > NULL in C just doesn’t belong at the end of a string.

    Different discussion. (And NUL, not NULL.)