• @[email protected]
    link
    fedilink
    39 days ago

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

      • @[email protected]
        link
        fedilink
        59 days ago

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

        • @[email protected]
          link
          fedilink
          English
          79 days 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.

          • @[email protected]
            link
            fedilink
            2
            edit-2
            9 days ago

            That’s your prerogative, but it honestly doesn’t make sense. Typescript adds almost no functionality to JS (and the few pieces it adds are now considered mistakes that shouldn’t be used anymore). It only focuses on adding typing information, and in the future you’ll be able to run TS that doesn’t use those few added features as JS (see the proposal).

            You can also add the TS types as comments in your JS code, which IMO shows that it’s not a different language.

      • matlag
        link
        fedilink
        English
        79 days ago

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

        • @[email protected]
          link
          fedilink
          1
          edit-2
          9 days 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.

      • @[email protected]
        link
        fedilink
        19 days 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