Strict semantics: Difference between revisions

From HaskellWiki
m (Reverted edits by Tomjaguarpaw (talk) to last revision by Lemming)
mNo edit summary
Line 1: Line 1:
Is the opposite of ... yeah guess what? ... the opposite of [[non-strict semantics]].
The opposite of [[non-strict semantics]]; it means that an undefined argument of a function leads to an undefined function value:
It means, that an undefined argument of a function leads to an undefined function value.
<pre>
<haskell>
f . f undefined = undefined
forall f. f undefined = undefined
</pre>
</haskell>


It may be implemented by [[eager evaluation]].
It may be implemented by [[eager evaluation]]. Examples of programming languages which use strict semantics include [[OCaml]] and LISP.
 
[[Strict semantics]] is used e.g. in [[OCaml]] and [[LISP]].


[[Category:Glossary]]
[[Category:Glossary]]

Revision as of 05:04, 1 January 2025

The opposite of non-strict semantics; it means that an undefined argument of a function leads to an undefined function value:

∀ f . f undefined = undefined

It may be implemented by eager evaluation. Examples of programming languages which use strict semantics include OCaml and LISP.