Skip to content
BENIBIX Learn

Compiled Language

Development🔤 LanguagesLanguage Kinds

A language turned into machine code first, then run. A build step, then a fast program.

Think of it like

Think of it like a book that is all put into French before anyone reads it. That takes time, then reading is quick.

Example

Jack builds his Go program once into one file. He copies that file to a server, and it runs there without Go installed.

Why it matters

They are often fast and easy to ship as one file. Many bugs show up before users see them.

Definition

A compiled language is turned into machine code before it runs. A tool called a compiler reads all the source code and builds a file the computer can run directly. C, C++, Rust and Go work this way. The build step takes time, but the result usually runs fast. The compiler also catches many mistakes before the program ever starts.

Example code

console
$ gcc hello.c -o hello
$ ./hello
Hello, world!
First the code is built into a program. Then the program runs on its own.

Common mistake

Thinking a compiled program runs on every machine. It is built for one kind of system and must be rebuilt for others.

Key takeaways

  1. 1
    Build, then run. The whole program is turned into machine code first.
  2. 2
    Fast result. The machine runs it with no translator.
  3. 3
    Early errors. Many mistakes are caught at build time.

Compare

Learn it properly