Specifically, do you worry that Microsoft is going to eventually do the Microsoft thing and horribly fuck it up for everyone? I’ve really grown to appreciate the language itself, but I’m wary of it getting too ingrained at work only to have the rug pulled out from under us when it’s become hard to back out.

Edit: not really “pulling the rug”, but, you know, doing the Microsoft classic.

  • Tyfon@programming.dev
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    1 year ago

    I’d like to point out that TypeScript is a superset of JavaScript, so if anything goes wrong with it, you can just remove the type information and you’ll have regular JavaScript.

    • silas@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I’d still have to do some refactoring in and around my classes though. There’s some syntax that is TypeScript-only, including things like extended classes.

    • jeffhykin@lemm.ee
      link
      fedilink
      arrow-up
      3
      arrow-down
      10
      ·
      edit-2
      1 year ago

      If I take my json and add a .yaml extension it works. If I take my c code and add a .cpp it works. If I take my js code and add a .ts … it doesn’t work

      TS branches off of the JS syntax (which is great! way better than a syntax rewrite), but TS is not a superset; it does not meet the practical or technical definition of a language superset.

        • jeffhykin@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          1 year ago

          Type annotations. It can be as simple a adding any in front of parameters, but there are other edgecases too, and when you have a really big codebase it can be a pain to convert.

        • jeffhykin@lemm.ee
          link
          fedilink
          arrow-up
          1
          arrow-down
          2
          ·
          edit-2
          1 year ago

          I didn’t say C++ was a superset of C, I said “if I take my c code and add a cpp extension it works”. Believe me, I am painfully aware of the not-a-superset problem between C and C++. My point is Typescript doesn’t even meet the very loose “its practically a superset” relationship that C++ has with C.

          • mrkite@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            if I take my c code and add a cpp extension it works

            and I pointed out that it doesn’t if your C code has a variable called “class”.

            • jeffhykin@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Don’t worry, none of my code uses that, designated initilizers, complex numbers, variable length arrays, typedef name overloading, unintilized constants, implicit void pointer casting, implicit function declarations, nested struct defintions, or any of the other exclusively-C features.