<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Strict_function</id>
	<title>Strict function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Strict_function"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Strict_function&amp;action=history"/>
	<updated>2026-04-18T14:21:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Strict_function&amp;diff=204954&amp;oldid=prev</id>
		<title>imported&gt;D.Lazard: /* top */ bf for article&#039;s title</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Strict_function&amp;diff=204954&amp;oldid=prev"/>
		<updated>2020-10-24T13:43:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top: &lt;/span&gt; bf for article&amp;#039;s title&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Refimprove|date=July 2016}}&lt;br /&gt;
In [[computer science]] and [[computer programming]], a [[function (computer programming)|function]] f is said to be &amp;#039;&amp;#039;&amp;#039;strict&amp;#039;&amp;#039;&amp;#039; if, when applied to a non-terminating expression, it also fails to terminate.&amp;lt;ref&amp;gt;{{Cite web|url=https://www.haskell.org/tutorial/functions.html|title=A Gentle Introduction to Haskell: Functions|website=www.haskell.org|access-date=2016-06-23}}&amp;lt;/ref&amp;gt; A &amp;#039;&amp;#039;&amp;#039;strict function&amp;#039;&amp;#039;&amp;#039; in the [[denotational semantics]] of [[programming language]]s is a [[function (mathematics)|function]] &amp;#039;&amp;#039;f&amp;#039;&amp;#039; where &amp;lt;math&amp;gt;f\left(\perp\right) = \perp&amp;lt;/math&amp;gt;.  The entity &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;, called &amp;#039;&amp;#039;[[Bottom type|bottom]]&amp;#039;&amp;#039;, denotes an expression that does not return a normal value, either because it loops endlessly or because it aborts due to an error such as division by zero.  A function that is not strict is called &amp;#039;&amp;#039;&amp;#039;non-strict&amp;#039;&amp;#039;&amp;#039;. A [[strict programming language]] is one in which user-defined functions are always strict.&lt;br /&gt;
&lt;br /&gt;
Intuitively, non-strict functions correspond to [[control structure]]s. Operationally, a strict function is one that always [[evaluate]]s its [[parameter|argument]]; a non-strict function is one that might not evaluate some of its arguments. Functions having more than one parameter can be strict or non-strict in each parameter independently, as well as &amp;#039;&amp;#039;jointly strict&amp;#039;&amp;#039; in several parameters simultaneously.&lt;br /&gt;
&lt;br /&gt;
As an example, the &amp;lt;code&amp;gt;if-then-else&amp;lt;/code&amp;gt; expression of many programming languages, called &amp;lt;code&amp;gt;[[?:]]&amp;lt;/code&amp;gt; in languages inspired by C, may be thought of as a function of three parameters. This function is strict in its first parameter, since the function must know whether its first argument evaluates to true or to false before it can return; but it is non-strict in its second parameter, because (for example) &amp;lt;code&amp;gt;if(false,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;,1) = 1&amp;lt;/code&amp;gt;, as well as non-strict in its third parameter, because (for example) &amp;lt;code&amp;gt;if(true,2,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;) = 2&amp;lt;/code&amp;gt;. However, it is jointly strict in its second and third parameters, since &amp;lt;code&amp;gt;if(true,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;) = &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;if(false,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;) = &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In a [[non-strict programming language|non-strict]] [[functional programming]] language, [[strictness analysis]] refers to any algorithm used to prove the strictness of a function with respect to one or more of its arguments. Such functions can be [[compilation (programming)|compiled]] to a more efficient [[calling convention]], such as [[call by value]], without changing the meaning of the enclosing program.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Eager evaluation]]&lt;br /&gt;
* [[Lazy evaluation]]&lt;br /&gt;
* [[Short-circuit evaluation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Strict Function}}&lt;br /&gt;
[[Category:Formal methods]]&lt;br /&gt;
[[Category:Denotational semantics]]&lt;br /&gt;
[[Category:Evaluation strategy]]&lt;/div&gt;</summary>
		<author><name>imported&gt;D.Lazard</name></author>
	</entry>
</feed>