Jump to content

Programming language implementation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by K.lee (talk | contribs) at 21:20, 5 June 2006 (quick and dirty stub. have at it.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

A programming language implementation is a system for executing programs written in a programming language. Given a program in some language, an implementation defines .

There are two general approaches to programming language implementation:

  • Interpretation: An interpreter takes as input a program in some language, and performs the actions written in that language on some machine.
  • Compilation: A compiler takes as input a program in some language, and translates that program into some other language, which may serve as input to another interpreter or another compiler.

Notice that a compiler does not directly execute the program. Ultimately, in order to execute a program via compilation, it must be translated into a form that can serve as input to an interpreter.

When a piece of computer hardware can interpret a programming language directly, that language is called machine code. A so-called native code compiler is one that compiles a program into machine code.

Many combinations of interpretation and compilation are possible, and many modern programming language implementations include elements of both. For example, the Smalltalk programming language is conventionally implemented by compilation into bytecode for a virtual machine, which is then either interpreted or compiled. This implementation strategy has been copied by many languages since Smalltalk pioneered it in the 1970's and 1980's.