Uncommon · Knowledge

Whitespace (programming language)

Esoteric programming language

Whitespace is an esoteric programming language with syntax where only whitespace characters (space, tab and newline) have meaning – contrasting typical languages that largely ignore whitespace characters. As a consequence of its syntax, Whitespace source code can be contained within the whitespace of code written in a language that ignores whitespace – making the text a polyglot.

From Wikipedia

Whitespace is an esoteric programming language with syntax where only whitespace characters (space, tab and newline) have meaning – contrasting typical languages that largely ignore whitespace characters. As a consequence of its syntax, Whitespace source code can be contained within the whitespace of code written in a language that ignores whitespace – making the text a polyglot. Whitespace is an imperative, stack-based language. The programmer can push arbitrary-width integer values onto a stack and access a heap to store data. An interpreter, along with its Haskell source code, is provided by the Whitespace creators. Stefan Vuksanović and Chris Morris, who also developed the Kaya and Idris languages, created Whitespace in 2002 at the University of Durham. Slashdot published a review on April Fool's Day 2003. The idea of using whitespace characters as operators for the C++ language had been facetiously suggested five years earlier by Bjarne Stroustrup. Whitespace defines a command as a sequence of whitespace characters. For example, [Tab][Space][Space][Space] performs arithmetic addition of the top two elements on the stack.

Text: Wikipédia, CC BY-SA 4.0. · Image: User:thateggs (Public domain) ·

Open

Tap to close

Confirmation