Encyclopedia > Interpreted programming language

  Article Content

Interpreted language

Redirected from Interpreted programming language

In computer programming, interpreted language is a vague term referring to languages, most implementations of which are interpreters. It is vague because any language can be compiled or interpreted; that is, for any language both a compiler and an interpreter can be written. This term has no meaning in computer science, which strictly distinguishes between languages and implementations. However, people often use it as a useful shortcut to signify languages that are traditionally interpreted, or for which no compilers are written.

In the early days of computing, language design was heavily influenced by the decision to use compilation or interpretation as a mode of execution. For example, some compiled languages require that programs must explicitly state the data-type of a variable at the time it is declared or first used. On the other hand, some languages take advantage of the dynamic aspects of interpretation to make such declarations unnecessary. For example, Smalltalk—which was designed to be interpreted at run-time—allows generic Objects to dynamically interact with each other.

Nowadays, the differences between the two styles of execution have largely been dealt with by more sophisticated designs. Most so-called interpreted languages use an intermediate representation[?], which combines both compilation and interpretation. In this case, a compiler may output some form of bytecode, which is then executed by a bytecode interpreter. Examples include Python, Java, Perl. Similarly, Ruby uses an abstract syntax tree as intermediate representation. The intermediate representation can be compiled once and for all, like Java, each time before execution like Perl or Ruby, or each time a change in the source is detected before execution like Python.

Interpreted languages still give programs certain extra flexibility over compiled languages. Features that are easier to implement in interpreters than in compilers include (but are not limited to)

  • platform independence (Java's byte code, for example)
  • dynamic evaluation of code (e.g. eval[?] function)
  • ease of debugging (It is easier to get source code information in interpreted language)
  • small program size (Since interpreted languages have flexibility to choose instruction code)
  • object polymophism
  • Dynamic scoping

Some languages that are normally interpreted:

  • BASIC (although the original version, Dartmouth BASIC, was compiled, as are most modern versions)
  • Euphoria
  • Forth (traditionally threaded interpreted)
  • JavaScript
  • Logo (interpretation makes interactivity easier)
  • Lisp (traditionally interpreted, modern versions compiled)
  • MUMPS (traditionally interpreted, modern versions compiled)
  • Perl (compiled to bytecode which is then interpreted)
  • Python (compiled to bytecode which is then interpreted)
  • Ruby

See also: interpreter, compiler, compiled language



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
North Lindenhurst, New York

... mi²). 4.9 km² (1.9 mi²) of it is land and none of the area is covered with water. Demographics As of the census of 2000, there are 11,767 people, 3,808 ...

 
 
 
This page was created in 39.6 ms