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.
| Point | Interpreted | Compiled |
|---|---|---|
| How it runs | Interpreter runs the code step by step | Whole program is converted first, then run |
| Speed | Usually slower | Usually faster |
| Errors | Found when that line runs | Many errors found before the program runs |
| Examples | Python, PHP, JavaScript | C, 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. |