Toy language
Encyclopedia
A toy language is a term for a computer programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 that is not considered to fulfill the robustness or completeness requirement of a computer programming language. As such it is not considered a suitable language for creating solid and reliable programs for use in production environments. Which programs to categorize as toy languages is difficult, however. Languages such as Brainfuck
Brainfuck
The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use...

 and Whitespace
Whitespace (programming language)
Whitespace is an esoteric programming language developed by Edwin Brady and Chris Morris at the University of Durham . It was released on 1 April 2003 . Its name is a reference to whitespace characters...

 are both considered esoteric programming language
Esoteric programming language
An esoteric programming language is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke...

s. They are Turing complete, which means they are able to compute any computable function, i.e. mathematically they have the same capabilities as languages such as Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

, C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

, C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 and Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

. Logo
Logo (programming language)
Logo is a multi-paradigm computer programming language used in education. It is an adaptation and dialect of the Lisp language; some have called it Lisp without the parentheses. It was originally conceived and written as functional programming language, and drove a mechanical turtle as an output...

 is another example of a toy language. Its goal was originally to create a math land where kids could play with words and sentences. For a long time GCC was shipped with a Toy programming languaged called Treelang which was essentially C without the advanced concepts such as pointers, arrays and records.

Limitations

A toy language is usually limited in one or several ways. That is it has major limitations in the number of programming constructs or concepts supported. The language might be mathematically complete. Another typical limitation of toy languages is that they do not necessarily have a set of support libraries that are considered a requirement for creating production quality programs.

Uses

The main use of a toy language is in computer languages research. Some uses are as frameworks for researching new programming constructs or as a prototype for new language concepts or paradigms
Programming paradigm
A programming paradigm is a fundamental style of computer programming. Paradigms differ in the concepts and abstractions used to represent the elements of a program and the steps that compose a computation A programming paradigm is a fundamental style of computer programming. (Compare with a...

. Another notable use is as a learning or demonstration tool, e.g. in universities, for programming constructs and techniques not available in mainstream languages.

Scheme as a toy language

Some people would argue today that Scheme is a toy language, as it is mostly used in academia. A view that many share is that even though it is complete in its own right, it has limited capability in real life projects. As such, other languages with similar properties but extended capabilities are preferred, such as Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

. Another, somewhat similar example, is Lava, which is purely experimental.

See also

  • Turing completeness
    Turing completeness
    In computability theory, a system of data-manipulation rules is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer. A classic example is the lambda calculus...

  • Esoteric programming languages
  • Treelang
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK