• itslilith@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    For old languages, null coalescing is a great thing for readability. But in general null is a bad concept, and I don’t see a reason why new languages should use it. That, of course, doesn’t change the fact that we need to deal with the nulls we already have.

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      How are we supposed to deal with null values though? It’s an important concept that we can’t eliminate without losing information and context about our data.

      0 and “” (empty string/char) are very often not equivalent to null in my use cases and mean different things than it when I encounter them.

      You could use special arbitrary values to indicate invalid data, but at that point you’re just doing null with extra steps right?

      I’m really lost as to how the concept isn’t neccessary.