• LeFantome@programming.dev
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      2 hours ago

      Rust does not compile down to C. It generates LLVM bytecode the same as Clang does. They both produce native executables. You do not need a C compiler on your system to run Rust binaries.

      Typescript produces JavaScript. You need a JavaScript interpreter to execute the output from TypeScript.

      Not the same thing.

      • dohpaz42@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        2 hours ago

        In before the pedants: clang is a c compiler, in that it compiles c code—but it also compiles other languages too. The distinction is that c, c++, rust, etc are compiled directly into byte code , whereas typescript is transpiled into another language (JavaScript) before it is executed. I’ll probably catch heat for this, but you can liken TypeScript to C++ because they both are supersets of another language.