Compiler and interpreter: making code run
Source code is written for people to read. A computer needs a way to turn those instructions into actions. A compiler translates a program into another representation. An interpreter carries out a program using its execution rules.
A music analogy
Imagine a written tune. One tool could translate it into instructions for a music box. Another could read the tune and play it as it goes. Both need to agree about the notes.
Real language tools can combine these approaches. “Compiled” and “interpreted” are descriptions of how a tool runs a program, not proof that one language is always fast or slow.
Pliro’s paths
When running source, Pliro first reads and checks the program. Its reference interpreter carries out the checked operations. A browser has a compatible runtime for browser execution.
For a native build, Pliro generates Go source, and the Go toolchain builds an executable for the selected target. The generated Go is an intermediate step; you normally keep editing your Pliro source.
A target describes the platform the result is built for. A Windows executable is not automatically a Linux application. Some targets also support different drawing or device features.
A useful distinction
Checking can catch an unknown name before execution. Running may reveal a calculation error that depends on an input. Building successfully does not prove that your game’s rules match your plan.
