you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 22 hours ago (5 children)

Same reason NULL != NULL. It makes sense if you understand how these values work.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 14 points 22 hours ago (4 children)
  • [–] 9 points 22 hours ago* (2 children)
  • [–] 14 points 21 hours ago (1 child)

    Ah, my brain was in C mode, where NULL is functionally 0. This is about the concept, which doesn't apply equally to all languages.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 21 hours ago* (last edited 20 hours ago)

    Yep. There are some languages where this applies, because it’s a mathematical concept. The point is it’s the same ‘no value’ concept, which isn’t shared by implemented the same way by all languages.

    C is strongly typed, and uses pointers, so NULL sort of intrinsically has a value in C.

    edit: my wording was a bit off

  • source
  • parent