Interpreted language

Interpreted language

In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter. Theoretically, any language may be compiled or interpreted, so this designation is applied purely because of common implementation practice and not some underlying property of a language.

Many languages have been implemented using both compilers and interpreters, including Lisp, Pascal, C, BASIC, and Python. While Java is translated to a form that is intended to be interpreted, just-in-time compilation is often used to generate machine code. The Microsoft .Net languages compile to CIL from which is often then compiled into native machine code; however there is a virtual machine capable of interpreting CIL.

Historical background of Interpreted/Compiled

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 while some interpreted 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.

Initially, interpreted languages were compiled line-by-line; that is, each line was compiled as it was about to be executed, and if a loop or subroutine caused certain lines to be executed multiple times, they would be recompiled every time. This has become much less common. 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 or threaded code, which is then executed by a bytecode interpreter. Examples include Python, and Java. Similarly, Ruby uses an abstract syntax tree as intermediate representation. The intermediate representation can be compiled once and for all (as in Java), each time before execution (as in Perl or Ruby), or each time a change in the source is detected before execution (as in Python).

Language features suiting interpreters well

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)
* reflective usage of the evaluator (e.g. a first-order eval function)
* dynamic typing
* ease of debugging (It is easier to get source code information in interpreted languages)
* small program size (Since interpreted languages have flexibility to choose instruction code)
* object polymorphism
* dynamic scoping

List of frequently interpreted languages

*APL A vector oriented language using an unusual character set.
*ASP Web page scripting language
*BASIC (although the original version, Dartmouth BASIC, was compiled, as are many modern BASICs)
**thinBasic
*COBOL
*ECMAScript
**ActionScript
**DMDScript
**E4X
**JavaScript (first named Mocha, then LiveScript)
**JScript
*Equation manipulation and solving systems
**GNU Octave
**IDL
**Mathematica
**MATLAB
*Euphoria Interpreted or compiled.
*Forth (traditionally threaded interpreted)
*Inform
*J An APL variant in which tacit definition provides some of the benefits of compilation.
*Lava
*Lisp
**Scheme
*Logo
*MUMPS (traditionally interpreted, modern versions compiled)
*R (programming language)
*Ruby
**JRuby( A Java implementation of Ruby)
*Smalltalk (pure object-orientation, originally from Xerox PARC, often supports debugging across machines.)
**Bistro
**Dolphin Smalltalk
**F-Script
**Little Smalltalk
**Squeak
**VisualAge
**VisualWorks
*Scripting languages
*Spreadsheets
**Excel stores formulas, interprets them from a tokenized format.
*S (programming language)
*Tcl
**XOTcl

Languages usually compiled to a virtual machine code

Many interpreted languages are first compiled to some form of virtual machine code, which is then either interpreted or compiled at runtime to native code.
*Java (frequently translated to bytecode, but can also be compiled to a native binary using an AOT compiler)
**Groovy
**Join Java
*Lua
*.NET Framework languages (translated to CIL code)
**C#
**Visual Basic .NET
*Perl
*PHP
*Pike
*Python
*Visual FoxPro

External links

* [http://drpubagump.ouaibou.info DrPubaGump] A tiny Interpreter written in Scheme, which provides to interpret PUBA-GUMP (a subset of BASIC) in Scheme fr icon

ee also

* Compiled language


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • interpreted language — interpretuojamoji kalba statusas T sritis informatika apibrėžtis ↑Programavimo kalba, pritaikyta ↑interpretavimui. Paprastai tokia kalba parašytos programos prieš jas vykdant verčiamos į joms artimą, bet interpretavimui patogesnį pavidalą. Kai… …   Enciklopedinis kompiuterijos žodynas

  • Language transfer — (also known as L1 interference, linguistic interference, and crossmeaning) refers to speakers or writers applying knowledge from their native language to a second language. It is most commonly discussed in the context of English language learning …   Wikipedia

  • Language interpretation — Interpreter redirects here. For the movie with the same title, see The Interpreter. For the band, see The Interpreters. For other uses, see Interpretation. Part of a series on …   Wikipedia

  • Language of thought — Jerry A. Fodor s Language of Thought (LOT) hypothesis states that cognition and cognitive processes are only remotely plausible when expressed as computational in terms of representational systems. He uses empirical data drawn from linguistics… …   Wikipedia

  • language — /lang gwij/, n. 1. a body of words and the systems for their use common to a people who are of the same community or nation, the same geographical area, or the same cultural tradition: the two languages of Belgium; a Bantu language; the French… …   Universalium

  • language, philosophy of — Philosophical study of the nature and use of natural languages and the relations between language, language users, and the world. It encompasses the philosophical study of linguistic meaning (see semantics), the philosophical study of language… …   Universalium

  • Interpreted — Interpret In*ter pret, v. t. [imp. & p. p. {Interpreted}; p. pr. & vb. n. {Interpreting}.] [F. interpr[^e]ter, L. interpretari, p. p. interpretatus, fr. interpres interpeter, agent, negotiator; inter between + (prob.) the root of pretium price.… …   The Collaborative International Dictionary of English

  • Language — This article is about the properties of language in general. For other uses, see Language (disambiguation). Cuneiform is one of the first known forms of written language, but spoken language is believed to predate writing by tens of thousands of… …   Wikipedia

  • Language of thought hypothesis — In philosophy of mind, the language of thought hypothesis (LOTH) put forward by American philosopher Jerry Fodor describes thoughts as represented in a language (sometimes known as mentalese) that allows complex thoughts to be built up by… …   Wikipedia

  • Language of the New Testament — The mainstream consensus is that the New Testament was written in a form of Koine Greek,[1][2] which was the common language of the Eastern Mediterranean[3][4][5][6] from the Conquests of Alexander th …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”