The word, used by computer scientists to mean ‘no value,’ has created long-running challenges

  • remotelove@lemmy.ca
    link
    fedilink
    arrow-up
    20
    ·
    16 days ago

    Who the hell writes if 'null'? If it’s a thing, what language would interpret a string like that?

    • ursakhiin@beehaw.org
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      16 days ago

      I’d bet it’s less simple input sanitizing and more 2 mistakes made separately because they don’t know any better.

      1. The input field converting everything to a string indiscriminately
      2. Because they did 1, converting everything back to the assumed type

      If the front end Dev makes the first mistake, null would be sent in the body as “null”. Then on the backend, somebody might even be binding the variables correctly, but before hand realizing they have to deal with the market and rather than just have a conversation undoes it in their own code.

    • Fonzie!@ttrpg.network
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      9 days ago

      It’s fine in PHP, so that catches most server backends.

      Ruby as well, it even raises a warning about the string where a bool should be!

      Python handles it just fine, as well.

      Rust doesn’t allow it, depending on the backend framework and server software this might give issues.

      The same goes for C# .NET

      So depending on how this is handled a C# or Rust backend might cause the name not to be stored, but then I’d expect nothing to be stored… :/