Content deleted Content added
m simplify markup from previous edit |
m Fixed broken links |
||
Line 3:
Nearly all [[programming language]]s in common use today are strict. Examples include [[C programming language|C]], [[C plus plus|C++]], [[Java programming language|Java]], [[Perl programming language|Perl]] (up through version 5), [[Python programming language|Python]], [[Ruby programming language|Ruby]], [[Common Lisp programming language|Common Lisp]], [[Scheme programming language|Scheme]], and [[ML programming language|ML]]. The best known non-strict languages are [[Haskell programming language|Haskell]], [[Miranda programming language|Miranda]], and [[Clean programming language|Clean]].
In most non-strict languages the non-strictness extends to [[algebraic data type|data constructor]]s. This allows conceptually infinite data structures (such as the list of all [[prime number]]s) 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 tree]] of [[chess]].
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:
* Because of the uncertainty regarding if and when expressions will be evaluated, non-strict languages generally must be [[purely functional]] to be useful.
* All [[computer architecture|hardware architecture]]s in common use are optimized for strict languages, so the best compilers for non-strict languages produce slower code than the best compilers for strict languages.
* [[Space complexity]] of non-strict programs is difficult to understand and predict.
|