• Scrubbles@poptalk.scrubbles.tech
    link
    fedilink
    English
    arrow-up
    1
    ·
    24 days ago

    Both of these are valid notation. Json spec also says that numbers are floats, so it’s perfectly acceptable to denote them this way. This is why currency should never use a number notation, and instead use a string. If it must be precise, use a string.

    • Statick@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      24 days ago

      I think they’re pointing out that Python outputs E notation vs JavaScript which outputs the decimal notation.

      Edit: Wasn’t agreeing with it, just explaining what they were pointing out.

      • Korne127@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        24 days ago

        Yeah, but that… doesn’t really matter. So it doesn’t really make sense to post that here, especially with that headline.