Compiler vs Transpiler Debate
Commenters debate whether source-to-source translation tools should be called transpilers or simply compilers, arguing that transpilation is a subset of compilation and dismissing 'transpiler' as unnecessary jargon.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Words mean what they mean. You could call any interpreter a compiler if you twisted it, and you'd sort of be right, but you'd be a lot more wrong. Same in this instance. Its an interpreter! And yes, it sort of does a job close enough to compilation that you wouldn't _really_ be incorrect calling it a compiler, but its not a compiler dammit!!
Isn't that just what a compiler is, where the target language is machine code?
You said it again. It's a compiler, not an interpreter.
The interpreter is certainly an interpreter, but a transpiler is arguably also a compiler, be it maybe with an easier target than most conventional compilers. Assembly language and machine code are also languages you can program in; in that sense you'd also have to call gcc a transpiler ;)
To quote the great Bob Nystrom's Crafting Interpreters, "Compiling is an implementation technique that involves translating a source language to some other — usually lower-level — form. When you generate bytecode or machine code, you are compiling. When you transpile to another high-level language, you are compiling too."Nowadays, people generally understand a compiler to be a program that reads, parses, and translates programs from one language to another. The fundamental stru
That is a fashion word from the JS community.A compiler is a compiler, regardless of the target language.Are you aware originally C compilers did not generate machine code directly, rather Assembly source and then called the Assembler on it.C++ and Objective-C initially generated C.Eiffel to this day generates either C and bytecode.Nim and Haxe are another examples, and so forth.
All compilers covert programs in one language (say C) into another, (say assembler or machine code), and they are called compilers. The whole transpiler thing is a bit bogus, but a C compiler has never IME been called a translator.
There is no real distinction, it is all just bad usage of the word. There are only compilers. It may compile to a high level language, but “transpiling” adds zero information to the sentence.
It is called a compiler even it outputs code in another language, transpiler is some neologism from JavaScript developers without a background in compiler design.
Technically transpiling is just a more specific kind of compiling, so you’re not wrong in saying compiling.