What is the difference between compiler and interpreter ??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between compiler and interpreter ???

What can I do with interpreter language but not with compiler language and vice versa ??? I knew that I can change the value of the variables in interpreter language like python (for example) , but I didn't understand how to do that, can anyone explain the difference please ?

19th May 2020, 2:39 AM
Ahmed Muhammed
Ahmed Muhammed - avatar
2 Answers
+ 11
Ahmed Muhammed Generally speaking, compiled languages are often strongly typed, which require variables to be declared as a specific type. Type validation will typically be completed at compile time. The compiler will often convert all the code to byte code, assembly, or machine code. This code will often be optimized by the compiler based on a series of compile time checks. Interpreted languages are typically weakly typed and therefore the variable type can be implicitly inferred based on the assigned value. Ultimately, both will get compiled to machine code. Interpreted will do so Just-In-Time (JIT). Compile time, type safety checks are powerful feature of strongly typed compiled languages. However, weakly typed, interpreted languages are less rigid and are more expressive. The trade off is performance and compile time checks that eliminate many issues that may not be revealed until runtime errors. This was an oversimplified explanation. Keep researching and learning. 👌
19th May 2020, 4:55 AM
David Carroll
David Carroll - avatar
+ 4
Here is a reference Ahmed Muhammed that breaks down the difference. An actual edu reference... https://kb.iu.edu/d/agsz
19th May 2020, 2:54 AM
BroFar
BroFar - avatar