Hacker News new | ask | show | jobs
by antisemiotic 2419 days ago
Fine, but by that logic, gcc with -O0 is a transpiler, and becomes a compiler again with -O2. Similarly, TS transpiles to JS, but, say, ClojureScript compiles to JS. And if a compiler is built with something like Nanopass, it's a sequence of transpilers that somehow become a compiler along the way.
1 comments

No I don’t agree. A compiler pass is not a compiler. An non-optimising C to assembly compiler is not compiling to the same level of abstraction.
>A compiler pass is not a compiler.

What is the difference, if there's one well-defined language before the pass and another after it?

>A non-optimising C to assembly compiler is not compiling to the same level of abstraction.

Neither are "transpilers", otherwise they'd be quite useless. Abstraction isn't a linear hirerarchy, in any case.

Terms are fuzzy. That doesn't mean they're useless. When I talk about 'transpilers' instead of 'compilers' it instantly gives people context.

The term's been in use since the 60s, when most compilers were not optimising.