A bit old but still interesting

  • kureta@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    24 hours ago

    Why? Typescript transpiles into js but maybe the transpiler intruduces some overhead, isn’t it possible? I am not familiar with these languages, so this is an honest question.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      23 hours ago

      It’s barely transpiled. There are a couple of features that involve actual code generation - enums and namespaces (which are almost never used), but the vast majority of it is just stripping the type annotations so the performance will be 100% identical.

      It’s like having “Python” and “Python with type hints” as separate languages and claiming there is a big speed difference between them.