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.

➡️ Stable 0.6x Programming Languages
3,227
Comments
20
Years Active
5
Top Authors
#1418
Topic ID

Activity Over Time

2007
2
2008
19
2009
50
2010
88
2011
90
2012
86
2013
127
2014
172
2015
170
2016
200
2017
291
2018
256
2019
163
2020
175
2021
277
2022
261
2023
256
2024
225
2025
289
2026
30

Keywords

OO GHC CPU e.g TypeScript JS IME SQL IBM JIT compiler language compilers machine code interpreter compiling code machine level language high level

Sample Comments

pbiggar Aug 18, 2009 View on HN

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!!

pcwalton Feb 23, 2016 View on HN

Isn't that just what a compiler is, where the target language is machine code?

j-pb Apr 26, 2016 View on HN

You said it again. It's a compiler, not an interpreter.

tomsmeding Jan 21, 2018 View on HN

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 ;)

traes Sep 5, 2023 View on HN

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

pjmlp Apr 8, 2022 View on HN

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.

zabzonk Feb 19, 2022 View on HN

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.

kaba0 May 28, 2021 View on HN

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.

pjmlp Jan 18, 2016 View on HN

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.

jrs95 Feb 4, 2018 View on HN

Technically transpiling is just a more specific kind of compiling, so you’re not wrong in saying compiling.