Difference between Compiled and Interpreted Language
Difference between Compiled and Interpreted Language
Prerequisite – Compiler vs Interpreter
Compiled Language:
A compiled language is a programming language which are generally compiled and not interpreted. It is one where the program, once compiled, is expressed in the instructions of the target machine; this machine code is undecipherable by humans. Types of compiled language – C, C++, C#, CLEO, COBOL, etc.
Interpreted Language:
An interpreted language is a programming language which are generally interpreted, without compiling a program into machine instructions. It is one where the instructions are not directly executed by the target machine, but instead read and executed by some other program. Interpreted language ranges – JavaScript, Perl, Python, BASIC, etc.
Let’s see the difference between Compiled and Interpreted Language:
S.NO. | COMPILED LANGUAGE | INTERPRETED LANGUAGE |
---|---|---|
1 | A compiled language is a programming language whose implementations are typically compilers and not interpreters. | An interpreted language is a programming language whose implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. |
2 | In this language, once the program is compiled it is expressed in the instructions of the target machine. | While in this language, the instructions are not directly executed by the target machine. |
3 | There are at least two steps to get from source code to execution. | There is only one step to get from source code to execution. |
4 | In this language, compiled programs run faster than interpreted programs. | While in this language, interpreted programs can be modified while the program is running. |
5 | In this language, compilation errors prevent the code from compiling. | In this languages, all the debugging occurs at run-time. |
6 | The code of compiled language can be executed directly by the computer’s CPU. | A program written in an interpreted language is not compiled, it is interpreted. |
7 | This language delivers better performance. | This languages delivers relatively slower performance. |
8 | Example of compiled language – C, C++, C#, CLEO, COBOL, etc. | Example of Interpreted language – JavaScript, Perl, Python, BASIC, etc. |