| Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|||||
Nearly all programming languages in common use today are strict. Examples include C, C++, Java, Perl, Python, Ruby, Common Lisp, Scheme, and ML. The best known non-strict languages are Haskell, Miranda, and Clean.
In most non-strict languages the non-strictness extends to data constructor s. This allows conceptually infinite data structures (such as the list of all prime numberIn mathematics, a prime number or prime for short, is a natural number whose only distinct positive divisors are 1 and itself; otherwise it is called a composite number . Hence a prime number has exactly two divisors. The number 1 is neither prime nor coms) to be manipulated in the same way as ordinary finite data structures. It also allows for the use of very large but finite data structures such as the complete game treeIn game theory, a game tree is a directed graph whose nodes are positions in a game and whose edges are moves. The complete game tree for a game is the game tree starting at the initial position and containing all possible moves from each position. tic-ta of chessFor other meanings, see Chess (disambiguation). Chess (from the Persian word Shah is a board game for two players played on a square board divided into eight rows (or ranks and eight columns (or files creating 64 individual squares which alternate in colo.
A non-strict programming language is more expressive than an otherwise equivalent strict language. However, non-strictness has several disadvantages which have prevented widespread adoption:
Strict programming languages are often associated with eager evaluationEager evaluation is the evaluation model in most traditional programming languages. In eager evaluation an expression is evaluated as soon as it gets bound to a variable. This is generally more efficient as a low-level strategy in simple programming langu, and non-strict languages with lazy evaluation, but other evaluation strategies are possible in each case. The terms "eager programming language" and "lazy programming language" are often used as synonyms for "strict programming language" and "non-strict programming language" respectively.
In many strict languages, some of the advantages of non-strict functions can be obtained through the use of macroMacro (meaning "large" or "wide") is also applied to macroeconomics, and macroscopic or "macro" lenses. Macro (meaning a kind of close-up photography) is found at Macro photography. A macro is an abstraction, whereby a certain textual pattern is replaceds.