What is an interpreted language?

An interpreted language is a language where a program called an interpreter reads the code and runs it step by step, instead of first turning the whole program into machine code. Python, JavaScript, PHP and Ruby are common examples.

A compiled language such as C or C++ is converted into a machine code file before it runs. Then the computer runs that file directly.

PointInterpretedCompiled
How it runsInterpreter runs the code step by stepWhole program is converted first, then run
SpeedUsually slowerUsually faster
ErrorsFound when that line runsMany errors found before the program runs
ExamplesPython, PHP, JavaScriptC, C++, Go

The line is not always sharp. Python, for example, also compiles code to bytecode first (see Is Python an interpreted language?).


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.