WHAT IS THE DIFFERENCE BETWEEN COMPILER AND INTERPETER ?

in #busy7 years ago (edited)

Hello Steemiter,

What is the difference? Which one should we use?

sadasdsadsadsadasdsa.jpg

Compiler is a program that transforms the code (source code) entered by a user into a desired code.
Interpreters, like compilers, perform the process of translating code from one language to another.
Compilers that run a source code after converting it to the target code, and therefore run the code to catch up the errors in the code and make the code better without running any more code. The compiler also runs the code in line or block and does not execute any lines that are not in the line. Those lines can not see the errors and can not make improvements called an interpeter.

Compilers are faster than interpreters. Because interpreters interpret each line one by one from the first line of code to the last line of code, and perform the operation for the code. Compilers translate the entire code into computer language. If there is an error, it reports all errors to the programmer. However, the interpreter reports the first error that is encountered, the first error can not be found until the error is resolved because the line is being processed in line.

As an example of program languages that use compilers; Pascal, C ++, Ada, Visual Basic, C and many more.

As an example of program languages that use interpreters; We can give you a lot of examples like HTML, XML, PHP, Script Languages.

programming-languages.png

One of the program languages that use both Compilers and Interpreters is JAVA. In Java, the code is compiled first and a code called byte code is generated that can be executed only in java virtual machines. This generated intermediate code is then executed in accordance with an interpreter structure in the java virtual machine.

Thank you for all of your support!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58404.34
ETH 2367.70
USDT 1.00
SBD 2.45