Interpreter Definition & Meaning

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.

Top Articles

The Complete List of 1500+ Common Text Abbreviations & Acronyms

Text Abbreviations reviewed by Web Webster   From A3 to ZZZ we list 1,559 SMS, online chat, and text abbreviations to help you translate and understand...

How to Create a Website Shortcut on Your Desktop

Website Shortcut on Your Desktop reviewed by Web Webster   This Webopedia guide will show you how to create a website shortcut on your desktop using...

Windows Operating System History & Versions

The Windows operating system (Windows OS) refers to a family of operating systems developed by Microsoft Corporation. We look at the history of Windows...

First to Fifth Generations of Computers

Reviewed by Web Webster   Learn about each of the 5 generations of computers and major technology developments that have led to the computing devices that...

What is a Passphrase?

What is a passphrase? A passphrase is a string of words used to help...

How to Use Google...

Updated by Jenna Phipps   Google Hangouts is a cloud-based messaging and video chat application...

What is Gross Revenue?

Gross revenue is the total amount of money (income) earned by a company...