• REDACTED@infosec.pub
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    9
    ·
    6 months ago

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

    • zagaberoo@sopuli.xyz
      link
      fedilink
      arrow-up
      36
      ·
      6 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
        9
        arrow-down
        5
        ·
        6 months ago

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

          • matlag@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            7
            ·
            6 months ago

            That’s also my understanding: “Javascript is great because you can use other languages and then transpile them to JS.”

            • FooBarrington@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              6 months ago

              JS itself is great, I prefer it to most other languages due to the flexibility that it allows. Adding types through TS to safeguard against footguns doesn’t mean you’re not still using JS. You can also add the types using comments instead if you prefer it, which means you’re actually writing raw JS.

          • sebsch@discuss.tchncs.de
            link
            fedilink
            arrow-up
            1
            ·
            6 months ago

            Yeah! Wasm is a thing. At least rust and go are pretty neat in the browser lately.

            We should leave that pile of semantics and just go further with web development