How Programming Languages Work
From source code to execution — how compilers, runtimes, type systems, and memory management work under the hood.
- Reading time
- ~18 min (+21 min optional)
- Level mix
- 3 beginner · 11 intermediate
A programming language is not just syntax — it’s a set of rules about how programs are structured, what a compiler or interpreter does with those rules, how memory is managed at runtime, and what the type system guarantees. This path unpacks all four layers.
Read the first two sections to understand the concepts, then dip into the language tour for concrete examples. Each language in the tour illustrates a different set of trade-offs in how these ideas are implemented.
Roadmap
Loading progress...
What a language is
A formal language for instructing computers — the human side of software.
Syntax is the grammar — which arrangements of symbols are legal; semantics is the meaning — what a legal program actually does when it runs.
A set of rules a programming language uses to assign and check the "kinds" of values, catching whole classes of bugs before the program runs.
Translating code
A program that translates source code in one language into another — usually a high-level language into machine code or an intermediate form.
A program that reads source code (or bytecode) and executes it directly, without first producing a standalone binary.
- ParsingOptional
Turning a stream of characters into a structured tree a program can analyse — the front-end of every compiler, query engine, and data format.
Managing memory
Automatic memory management — the runtime tracks which allocated objects are still in use and frees the rest, so programmers don't have to.
How a running program acquires and releases memory — the stack and the heap, allocation and freeing, and the strategies (manual, GC, ownership) that prevent leaks and corruption.
A tour of languages
- PythonOptional
A general-purpose, dynamically typed, interpreted programming language known for readable syntax and a vast ecosystem.
- JavaScriptOptional
A dynamically typed, multi-paradigm language created for the browser, now the most-deployed runtime on Earth — browsers, Node.js, Deno, Bun, and edge platforms.
- COptional
A compact, portable systems programming language designed in the early 1970s — the implementation language of Unix and, to this day, of most operating systems, compilers, and infrastructure.
- RustOptional
A modern systems language with C-like performance, no garbage collector, and a borrow checker that guarantees memory safety at compile time.
- JavaOptional
A statically typed, object-oriented language that compiles to bytecode and runs on the JVM — "write once, run anywhere" — long dominant in enterprise backends and Android.
- GoOptional
A small, garbage-collected, compiled language with first-class concurrency, designed at Google for building reliable network services.