Misplaced Pages

Concatenative programming language: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 14:40, 23 September 2004 editRJHall (talk | contribs)Autopatrolled, Pending changes reviewers90,673 editsNo edit summary← Previous edit Revision as of 23:16, 1 November 2004 edit undoABCD (talk | contribs)11,256 editsNo edit summaryNext edit →
Line 1: Line 1:
In '''concatenative''' ]s, the ] of appropriate programs denotes the composition of the ]s which the programs denote. Operations map an input ] into a results stack, and so it is possible to repeatedly concatenate a sequence of operations. In '''concatenative''' ]s, the ] of appropriate programs denotes the composition of the ]s which the programs denote. Operations map an input ] into a results stack, and so it is possible to repeatedly concatenate a sequence of operations.


A programming language is concatenative (and not ]) when: A programming language is concatenative (and not ]) when:

Revision as of 23:16, 1 November 2004

In concatenative programming languages, the concatenation of appropriate programs denotes the composition of the functions which the programs denote. Operations map an input stack into a results stack, and so it is possible to repeatedly concatenate a sequence of operations.

A programming language is concatenative (and not applicative) when:

  • The elementary well-formed expressions of the language are monadic functions of a nameless data stack.
  • If X and Y are well-formed expressions, then the concatenation of X and Y is well-formed.
  • If Z is the concatenation of X and Y, then the value of Z is the composition of the values of X and Y.

Examples

The canonical examples of concatenative programming languages are Forth and Joy. In Joy, the program fragment:

2 7 +

Pushes "2" then "7" onto the stack. The "+" operator then replaces the stack with a new stack that contains the resulting sum "9".

The Category:Concatenative programming languages contains an exhaustive list of those known to Misplaced Pages.

External links


This article is a stub. You can help Misplaced Pages by expanding it.