• REDACTED@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    3 months ago

    Imagine doing math with strings and then blaming the language not yourself

    • zagaberoo@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      The risk is when it happens unintentionally. The language is bad for hiding such errors by being overly ‘helpful’ in assuming intent.

      • FooBarrington@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Sure, but at this point it’s your own fault if you don’t use Typescript to keep these issues from happening.

          • FooBarrington@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            3 months ago

            Not really, considering Typescript only adds static types to JS. It’s not a different language, it’s an extension.

            • Quibblekrust@thelemmy.club
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 months ago

              Since it needs to be compiled to JavaScript in order to be used, I kind of consider it a different language. Yes, it’s a strict superset of JavaScript, but that makes it different.