• melfie@lemy.lol
    link
    fedilink
    arrow-up
    45
    arrow-down
    1
    ·
    24 hours ago

    I worked in heavy JavaScript codebases back in the IE days and wasn’t too crazy about it. Then JIT compilers like v8 came along and made it run a lot faster and TypeScript also made it more usable for larger codebases. I now consider TypeScript among my favorite languages. I’ve also written a lot of Go lately, and while I appreciate its speed and smaller memory footprint, the missing language features kind of grate on me and I don’t mind taking a bit of a performance hit for the (IMO) superior ergonomics of TypeScript, especially for workloads where I/O is more of the bottleneck than compute.

    • sip@programming.dev
      link
      fedilink
      arrow-up
      14
      ·
      18 hours ago

      agreed. typescript is excelent, especially if you make it strict and know a bit of complex types to make sure things stay put.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        14 hours ago

        Chiming in as a professional TS dev. It’s really a joy to do web dev work in the post TS world.

        • biggeoff@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          5 hours ago

          What do you think of JSDoc? As someone who knows neither I find the idea of no required transpilation very appealing, while still getting the TS ecosystem tools.

          • Victor@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 hours ago

            JSDoc is much more cumbersome than using TypeScript. That’s it. It clutters the code in a way that TypeScript somehow avoids. TS types are smoothly integrated in the code itself, IMO. Not as much the case with JSDoc.

        • sip@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          5 hours ago

          i wish a more performing language would have this type system. the only other ones I know are Rust which is a bit strict and slow to dev on, and Haskell which is too much.

            • sip@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              5 hours ago

              I asked chatgpt for a few languages with a good typesystem and it suggested ocaml among other (scala, rust, haskell, f#)

              Then asked for a 100 line ocaml REST API example with a popular framework and db lib… and it looks mostly like Haskell.

              edit: async is done with monads

              • Victor@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                4 hours ago

                If it looks mostly like Haskell but has better tooling, I’m in. I have yet to manage to successfully set up a Haskell environment on my own PC. 😅 I am obviously missing something.