What is the difference between interpretation and compilation in programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 23

What is the difference between interpretation and compilation in programming?

13th Apr 2017, 10:59 AM
A$APcode
A$APcode - avatar
16 Answers
+ 21
Interpretation: An interpreter reads a program line by line, reading every expression and gives output if the program is correct. It stops/gives error when it encounters the first mistake in any line of code. This process is interpretation. Compilation: In this, a compiler reads the program in one go and gives output if the program is correct else an error. Both, Interpreter & Compiler are special programs that converts a program into machine language.
13th Apr 2017, 2:28 PM
Vikash Kumar
Vikash Kumar - avatar
+ 12
Interpreter only shows the error first encountered. But compiler shows each possible error.
23rd Apr 2017, 11:27 AM
Dipan Nanda
Dipan Nanda - avatar
+ 8
An interpreter runs and interprets the code line-by-line (making it slower than a compiler), checks for errors along with it and stops when there is one. However, a compiler does not run the code. It directly compiles the whole code, and is faster in checking for errors as compared to an interpreter.
20th Apr 2017, 5:00 AM
Param Siddharth
Param Siddharth - avatar
+ 4
interpreter turn your code in computer binaries (1s and 0s) line by line(on time of execution) and a compiler turn it all to computer binaries first, and yhen execute it
17th Apr 2017, 9:26 AM
Arthur Costa
+ 4
interpretation is for Scripting languages and it translate code to machine language Line-by-line while Compilation is for programming languages and it translated codes at once
22nd Apr 2017, 6:30 AM
JideGuru
JideGuru - avatar
+ 4
the role of compiler and interpreter is not to report error.. it just converts program code into machine code and vice-versa.. if any error is encountered in b/w then it reports about it.. compiler--> full code in one go interpreter-->line by line
22nd Apr 2017, 8:30 AM
Phantom7
Phantom7 - avatar
+ 3
Interpreter interprits code line by line if get any error in program then it will start from beginning. While Compiler compiles whole code at a time which is faster to find error and solve it
19th Apr 2017, 10:39 AM
Aniket Dhanak
Aniket Dhanak - avatar
+ 2
1. the compiler compiles then launches the program. 2. the interpreter runs the program and then compiles it.
19th Apr 2017, 7:58 PM
Cash Hoffman
+ 2
Compiler reads the program for syntax & semantic of the program else it gives error.... Interpreter execute the program if it doesn't have any error in it. Some programs like HTML doesn't have compiler it have only interpreter. It doesn't gives any error only it display semantic in the web browser ...
21st Apr 2017, 1:12 PM
Jayakumar Arasan
Jayakumar Arasan - avatar
+ 2
Both are convert code into source code . interpreter convert code line by line. mean if error in frist line than it will not read second line. complier convert whole code in one time and show errors at end of the completion. Hope you understand.
25th Apr 2017, 4:19 PM
Rajesh Kumar (Rj)
Rajesh Kumar (Rj) - avatar
+ 1
compiler compiles then runs. Interpreter compiles at runtime.
24th Apr 2017, 11:46 AM
James
James - avatar
0
Compiler reads the program for syntax & semantic of the program else it gives error.... Interpreter execute the program if it doesn't have any error in it. Some programs like HTML doesn't have compiler it have only interpreter. It doesn't gives any error only it display semantic in the web browser ...
21st Apr 2017, 1:12 PM
Jayakumar Arasan
Jayakumar Arasan - avatar
0
interpretation is reading or checking the code line by line and if any error is found you can't go further before correcting it. whereas compilation is reading and checking the whole code at once and reporting all errors found in it.
27th Apr 2017, 7:44 AM
Saurav Jha
Saurav Jha - avatar
0
A computer program is usually written in high level language described as a source code. The difference between an interpreter and compiler is the point at which a source code is actually executed. This means that when convert source code into machine code , we use either a compiler or an interpreter. So generally categorizing computer languages by "compiled" or "interpreted" doesn't make much sense. Now a days, interpreting Vs. compiling is a trade-off, with time spent compiling often being rewarded by better runtime performance , but an interpretative environment giving more opportunities for interaction . http://net-informations.com/q/diff/cvsi.html
23rd Nov 2020, 5:02 AM
evanchitger
0
Interpreted language follows one step to get from source code to execution. A compiled language is converted into machine code so that the processor can execute it. An interpreted language is a language in which the implementations execute instructions directly without earlier compiling a program into machine language. https://candy-crush.io
14th Sep 2023, 7:38 AM
lauryfriese
0
Gives error when it encounters the first mistake in any line of code. https://run3online.pro
25th Jan 2024, 3:15 AM
evawillms