How Are Programming Languages Made?

Programming languages are implemented using other languages. A compiler or interpreter is a program — and every program is written in some language. The first compilers were written in assembly; today most are self-hosting or written in C, C++, or Rust.

What is a Programming Language Implementation?

A programming language is defined by its specification (grammar, semantics). Its implementation is a compiler or interpreter that executes code written in that language. CPython implements Python; rustc implements Rust; V8 implements JavaScript.

What Compilers and Interpreters Do

A compiler translates source code to machine code or bytecode ahead of time. A interpreter reads and executes source code directly. Most languages use one or both: Java compiles to bytecode, then the JVM interprets or JIT-compiles that bytecode.

The Bootstrap Problem

To write a compiler for a new language, you need an existing language to write it in. Early compilers were written in assembly or C. Once a compiler is stable, it can be rewritten in the language itself — this is called bootstrapping. Languages like Rust, Go, Haskell, and OCaml are self-hosting: their compilers are written in themselves.

Examples from the Dataset

Further Reading

Explore the Full Graph →