Content deleted Content added
Astrophobe (talk | contribs) m ce |
m Task 18 (cosmetic): eval 4 templates: hyphenate params (8×); |
||
Line 1:
[[File:Whitespace in vim2.png|right|206px|thumb|Whitespace [[hello world program]] with syntax highlighting {{legend|#0000ab|tabs}} {{legend|#ab0000|spaces}}]] <!-- make SVG file -->
'''Whitespace''' is an [[esoteric programming language]] developed by Edwin Brady and Chris Morris at the [[University of Durham]] (also developers of the [[Kaya (programming language)|Kaya]] and [[Idris (programming language)|Idris]] programming languages). It was released on 1 April 2003 ([[April Fool's Day]]). Its name is a reference to [[whitespace character]]s. Unlike most programming languages, which ignore or assign little meaning to most whitespace characters, the Whitespace interpreter ignores any non-whitespace characters. Only [[Space character|spaces]], [[Tab character|tabs]] and [[linefeed]]s have meaning.<ref name="whitespace">{{cite web|url=http://compsoc.dur.ac.uk/whitespace/tutorial.html|title=Whitespace|website=Compsoc|
The [[programming language|language]] itself is an [[imperative programming|imperative]] [[stack-based language]]. The [[virtual machine]] on which the programs run has a stack and a [[dynamic memory allocation|heap]]. The programmer is free to push arbitrary-width integers onto the stack (currently there is no implementation of floating point numbers) and can also access the heap as a permanent store for variables and [[data structures]].
== History ==
Whitespace was created by Edwin Brady and Chris Morris in 2002. [[Slashdot]] gave a review of this [[programming language]] on 1 April 2003.<ref>{{Cite web |url=http://developers.slashdot.org/story/03/04/01/0332202/New-Whitespace-Only-Programming-Language |title=New Whitespace-Only Programming Language |date=2003-04-01 |website=Slashdot |author=Timothy |
The idea of using whitespace characters as operators for the [[C++]] language was facetiously suggested five years earlier by [[Bjarne Stroustrup]].<ref>{{cite web |url=http://www.stroustrup.com/whitespace98.pdf |title=Generalizing Overloading for C++2000 |first=Bjarne |last=Stroustrup |publisher=AT&T Labs |___location=Florham Park, NJ, USA |
== Syntax ==
Line 14:
Data is represented in [[Binary code|binary]] using spaces (0) and tabs (1), followed by a linefeed; thus, space-space-space-tab-space-tab-tab-linefeed is the binary number 0001011, which is 11 in decimal. All other characters are ignored and thus can be used for comments.
Code is written as an ''Instruction Modification Parameter'' (IMP) followed by the operation.<ref name="tutorial">{{cite web|url = http://compsoc.dur.ac.uk/whitespace/tutorial.html|title = Whitespace Tutorial|website = CompSoc.dur.ac.uk|
{| class="wikitable"
|-
|