https://wiki.haskell.org/index.php?title=Fairbairn_threshold&feed=atom&action=historyFairbairn threshold - Revision history2024-03-29T11:31:59ZRevision history for this page on the wikiMediaWiki 1.35.5https://wiki.haskell.org/index.php?title=Fairbairn_threshold&diff=63294&oldid=prevSjakobi: Add reference to Jón Fairbairn, email2020-05-04T14:41:38Z<p>Add reference to Jón Fairbairn, email</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:41, 4 May 2020</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 41:</td>
<td colspan="2" class="diff-lineno">Line 41:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The Fairbairn threshold is named after Jón Fairbairn, one of the original Haskell committee members. An argument of his that may have originated the term is [https://mail.haskell.org/pipermail/libraries/2006-October/005959.html this email to the libraries mailing list].</div></td>
</tr>
</table>Sjakobihttps://wiki.haskell.org/index.php?title=Fairbairn_threshold&diff=62787&oldid=prevHvr at 19:41, 23 February 20192019-02-23T19:41:54Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:41, 23 February 2019</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>== Fairbairn <del class="diffchange diffchange-inline">threshold</del></div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>== Fairbairn <ins class="diffchange diffchange-inline">Threshold ==</ins></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Quoting Edward Kmett [https://mail.haskell.org/pipermail/libraries/2012-February/017548.html (src)]:</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Quoting Edward Kmett [https://mail.haskell.org/pipermail/libraries/2012-February/017548.html (src)]:</div></td>
</tr>
</table>Hvrhttps://wiki.haskell.org/index.php?title=Fairbairn_threshold&diff=62786&oldid=prevHvr: Created page with "== Fairbairn threshold Quoting Edward Kmett [https://mail.haskell.org/pipermail/libraries/2012-February/017548.html (src)]: ---- <blockquote> The Fairbairn threshold is the..."2019-02-23T19:40:59Z<p>Created page with "== Fairbairn threshold Quoting Edward Kmett [https://mail.haskell.org/pipermail/libraries/2012-February/017548.html (src)]: ---- <blockquote> The Fairbairn threshold is the..."</p>
<p><b>New page</b></p><div>== Fairbairn threshold<br />
<br />
Quoting Edward Kmett [https://mail.haskell.org/pipermail/libraries/2012-February/017548.html (src)]:<br />
<br />
----<br />
<br />
<blockquote><br />
The Fairbairn threshold is the point at which the effort of looking up or<br />
keeping track of the definition is outweighed by the effort of rederiving<br />
it or inlining it.<br />
<br />
The term was in much more common use several years ago.<br />
<br />
Adding every variant on every operation to the Prelude is certainly<br />
possible given infinite time, but this of course imposes a sort of indexing<br />
overhead mentally.<br />
<br />
The primary use of the Fairbairn threshold is as a litmus test to avoid<br />
giving names to trivial compositions, as there are a potentially explosive<br />
number of them. In particular any method whose definition isn't much longer<br />
than its name (e.g. fooBar = foo . bar) falls below the threshold.<br />
<br />
There are reasonable exceptions for especially common idioms, but it does<br />
provide a good rule of thumb.<br />
<br />
The effect is to encourage simple combinators that can be used in multiple<br />
situations, while avoiding naming the explosive number of combinations of<br />
those combinators.<br />
<br />
Given n combinators I can probably combine two of them in something like<br />
O(n^2) ways, so without the threshold as a rule of thumb you wind up with a<br />
much larger library, but no real greater utility and much higher cognitive<br />
overhead to track all the combinations.<br />
<br />
Further, the existence of some combinations tends to drive you to look for<br />
other ever larger combinations rather than learn how to compose combinators<br />
or spot the more general usage patterns yourself, so from a [https://en.wikipedia.org/wiki/POSIWID POSIWID]<br />
perspective, the threshold encourages better use of the functional<br />
programming style as well.<br />
</blockquote><br />
<br />
----</div>Hvr