What is an Interpreter?

By | July 8, 2019

High-level programming language like Java, Python, C++, PHP, and JavaScript are more human-friendly, which mean these languages are readable and understandable by a human. But the computer does not understand high-level programming languages it only understands 1 and 0. So the question is how the computer understands all the code written by these high-level programming languages, it uses translators like compiler and interpreter which convert that human written code into machine language code.

What is an Interpreter?

An interpreter is a computer program that is used to execute the written code or program line by line. The interesting thing about interpreter is it executes the program line by line which means it reads a line from the code and executes it simultaneously. The line by line code execution makes debugging easier in the interpreter because it stops execution where it found the error and the developer can visit that line directly to debug.

Programming languages like Python, Perl, MATLAB, and Ruby uses an interpreter to execute their code.

Interpreter Advantages and Disadvantages:

Advantages

  • It makes debugging very easy
  • It uses less memory to execute the program
  • It comes very handily when we want a program to test the outputs

Disadvantages

  • The biggest disadvantage of interpreters is its speed as compared to the compiler its performance is very slow

People Also Read:

Leave a Reply

Your email address will not be published. Required fields are marked *