• derpgon@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    3 months ago

    That’s transpiling, not compiling. Compiling is usually meant as “directly to machine code”, but I am yet to find an “official definition”.

    • AbelianGrape@beehaw.org
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      There is no official definition, in part because there isn’t any formal way to define the term that satisfies our intuition.

      Most treatments will handle “transpiling” as a special case of “compiling” and some will even handle decompilation as a special case where the object language is higher level than the source. Of course, even defining “higher level” can be quite hard.

      Plenty of languages “compile to C” and I see no issue with saying something “compiles to js,” especially given that js mostly lacks features of purescript rather than the other way around.

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      transpiling is just a type of compiling. compiling in no terms means ‘directly to machine code’.