Compiled Vs Interpreted Languages
There is no such thing as a purely Interpreted Language or purely Compiled Language.
It is not the property of a programming language to be either compiled or interpreted but the implementation of the language instead. It is the Compiler and Interpreter job to convert the text-based code written in any language to machine readable code for execution.
Language Implementation
Almost every mainstream language implementation(compiler/interpreter/runtime) does:
- Parsing → turn source code into an Abstract Syntax Tree (AST)
- Analysis → Type Checking, validation, optimizations
- Transformation → convert into something executable:
Same language can have multiple execution strategies.
When people say Interpreted Language vs Compiled Language, they really mean:
-
Compiled-first (ahead-of-time)
- Code is translated to Machine Code before execution. For example, C, C++, Rust, Go, etc.
- But even here, it is not just compilation but also parsing, analysis, and Intermediate Representation (IR) generation.
-
Interpreted / runtime-driven
- Code is executed via a runtime system. For example, Python (CPython) and JavaScript (V8 JavaScript Engine), etc.
- Python gets compiled to bytecode first and V8 uses JIT Compiler.
- But even here, it is not just pure interpretation.
The real difference is really implementation, language execution strategy. More like, WHEN and, HOW things happen before execution.
