Stream: software unscripted podcast

Topic: compiler vs interpreter vs transpiler


view this post on Zulip Brendan Hansknecht (Mar 21 2024 at 00:19):

I feel like the recent podcast could have nailed down these definitions better.

I would put it as roughly

Compiler: one format to another format

Interpreter: executes a format

Transpiler: category of compiler. human readable format to another human readable format

view this post on Zulip Brendan Hansknecht (Mar 21 2024 at 00:22):

I get that there are still edge cases, but from an understandability perspective, I think these are pretty clear.

JVC: compiler
JVM: interpreter

Elm: transpiler

Roc: compiler

Python: interpreter

CPU: interpreter

view this post on Zulip Richard Feldman (Mar 21 2024 at 00:26):

I like that! :smiley:

view this post on Zulip Hannes (Mar 25 2024 at 11:17):

Those seem like good definitions to me, I guess JIT compilers are both interpreters and compilers using these definitions?

view this post on Zulip Hristo (Mar 25 2024 at 13:29):

I recently heard a nice definition (indented deliberately somewhat colloquially) of a transpiler on the Developer Voices podcast, by the host himself: "A transpiler is a compiler which compiles down to a language you might want to write in" (paraphrased).

view this post on Zulip Brendan Hansknecht (Mar 25 2024 at 15:14):

Jit compilers are often compilers and interpreters. They first start on interpreter mode. If the code is run enough, it is compiled to assembly.

That said, it depends on the specific jit compiler design and impl. For example, you could jit compile a language by:

  1. Compile a dev build with instrumentation.
  2. When instrumentation hits a high enough count, recompile a chunk of code in release.

This would only be a compiler with the CPU doing all interpreting.

view this post on Zulip Brendan Hansknecht (Mar 25 2024 at 15:16):

Also, that is a solid transpiler definition as well

view this post on Zulip Zellyn Hunter (Mar 25 2024 at 16:07):

Kris Jenkins recently half-jokingly referred to his definition of a transpiler: a compiler that outputs a language you would want to write. :smile:

But Brendan's definition is great — I like making transpilers a subset of compilers, rather than a pejorative “not a real compiler”.

view this post on Zulip Zellyn Hunter (Mar 25 2024 at 16:10):

Oops. @Hristo beat me to the Developer Voices anecdote :smile:

view this post on Zulip Anton (Mar 25 2024 at 17:13):

Random thought; seems like Roc could be a nice language to create a transpiler with.

view this post on Zulip Hristo (Mar 25 2024 at 17:56):

No worries, @Zellyn Hunter you probably did the quote better justice than my attempt at paraphrasing from memory :)

:100: regarding Brendan's definitions and expansions upon the concepts!


Last updated: Jul 06 2025 at 12:14 UTC