Meme transcription:

Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?

Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”

  • kamen@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 days ago

    Oof.

    I guess this is one of the reasons that some linters now scream if you don’t provide base when parsing numbers. But then again good luck finding it if it happens internally. Still, I feel like a ZIP should be treated as a string even if it looks like a number.

    • bitfucker@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      Yep. Much like we don’t treat phone numbers like a number. The rule of thumb is that if you don’t do any arithmetic with it, it is not a “number” but numeric.