To compile is to turn a computer program written in a given language into a set of instructions in another format or language.
- A compiler executes this kind of task.
- Example β a program written in a language such as C++, Rust, or Java is turned into executable/runnable code, or binary/machine code by a compiler
- Basically, if code is not compiled, it is essentially useless to a computer as it cannot inherently understand the code until the code is translated into something that it can execute.
- Types of compilation:
- Ahead-of-time β run when a command is used in the command line in a shell environment (terminal/console) or IDE