Toy programming language

From Wikipedia, the free encyclopedia
  (Redirected from Toy language)
Jump to: navigation, search

A toy language is a computer programming language that lacks the requirements to create reliable, maintainable computer programs in a production environment. Categorizing a programming language as a toy language is difficult, however, as the definition is often subjective. Also, a "toy" language is distinguished from domain-specific languages and esoteric programming languages. A "problem domain" language is a limited programming language made for a specific purpose, such as the PostScript language used in PDF documents, or the limited instruction set used to program the multiple core graphics processing unit in a video card. An "esoteric language" is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, or as a joke, such as Befunge or LOLCODE.

Toy languages exclude "one time" use compilers and interpreters, such as bootstrapping compilers which are used to create the initial compiler for a language unavailable on the target machine. The bootstrap compiler changes the source into something the bootstrap machine can run, and once the bootstrap compiler creates the initial compiler, it can compile itself.

One way to consider if a language is not a toy is to consider the question, "Would a professional programmer with several years of experience seriously consider using the language as a means to provide a reasonable, cost effective solution for a customer's problem?"

Uses[edit]

Toy languages are used in computer language research. Some are frameworks for researching new programming constructs, or prototypes for new language concepts or paradigms. Others are learning or demonstration tools—e.g., in universities, for programming constructs and techniques not available in mainstream languages, or as an exercise in building a language from scratch.

For a long time, the GNU Compiler Collection was shipped with a toy programming language called Treelang which was essentially C without advanced features such as pointers, arrays, and records.