• LillyPip@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    3
    ·
    10 hours ago

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

        • SpaceNoodle@lemmy.world
          link
          fedilink
          arrow-up
          13
          ·
          9 hours ago

          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.

          • LillyPip@lemmy.ca
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            8 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

      • djmikeale@feddit.dk
        link
        fedilink
        arrow-up
        6
        ·
        9 hours ago

        You can kinda think of it as null meaning undefined. In this case, “undefined does not equal undefined” seems easier for me to wrap my head around