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:

Same language can have multiple execution strategies.

When people say Interpreted Language vs Compiled Language, they really mean:

  1. Compiled-first (ahead-of-time)

  2. 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.