Interpreter

An interpreter is a program that executes instructions written in a high-level language. Interpreters enable other programs to run on a computer or server. They process program code at run time, checking the code for errors line by line.

There are two ways to run programs written in a high-level language. The most common is to compile the program; the other method is to pass the program through an interpreter.

INTERPRETER VERSUS COMPILER

An interpreter translates high-level instructions into an intermediate form, which it then executes. In contrast, a compiler translates high-level instructions directly into machine language. Compiled programs generally run faster than interpreted programs. Compilers see all errors upon compilation, which must all be resolved before the program can run. Since the errors have all been fixed by runtime, the program will run more quickly.

Interpreted programs typically run more slowly than compiled programs, because interpreters translate code one section at a time. An interpreter requires a discovered error to be fixed before the program can continue running.

The advantage of an interpreter, however, is that it does not need to go through the compilation stage during which machine instructions are generated. The compilation process can be time-consuming if the program is long. An interpreter, on the other hand, can immediately execute high-level programs.

 Interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly. Interpreters are also often used in education because they allow students to program interactively.

Both interpreters and compilers are available for most high-level languages. However, BASIC and LISP are especially designed to be executed by an interpreter. In addition, page description languages, such as PostScript, use an interpreter. Every PostScript printer, for example, has a built-in interpreter that executes PostScript instructions.

Dynamic and static typing

Dynamic and static typing have to do with how data types in a program are handled at compilation time. Dynamically typed programs don’t require data types to be checked for accuracy until the program runs; statically typed programs require type checking at compilation. There is no completely direct connection between typing and using an interpreter or compiler. Interpreters can translate both dynamically and statically typed code, and compilers can also compile both static and dynamic programs.

 

 

 

Vangie Beal
Vangie Beal
Vangie Beal is a freelance business and technology writer covering Internet technologies and online business since the late '90s.
Get the Free Newsletter
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.

Related Articles

Complete List of Cybersecurity Acronyms

Cybersecurity news and best practices are full of acronyms and abbreviations. Without understanding what each one means, it's difficult to comprehend the significance of...

Human Resources Management System

A Human Resources Management System (HRMS) is a software application that supports many functions of a company's Human Resources department, including benefits administration, payroll,...

How To Defend Yourself Against Identity Theft

Almost every worldwide government agency responsible for identity theft issues will tell you the same thing: The first step to fighting identity theft is...

Infographic

An infographic is a visual representation of information or data. It combines the words information and graphic and includes a collection of imagery, charts,...

ScalaHosting

ScalaHosting is a leading managed hosting provider that offers secure, scalable, and affordable...

HRIS

Human resources information system (HRIS) solutions help businesses manage multiple facets of their...

Best Managed Service Providers...

In today's business world, managed services are more critical than ever. They can...