<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;action=history&amp;feed=atom</id>
		<title>Apply Functional Programming Principles - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;action=history"/>
		<updated>2013-05-23T18:46:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.11.0</generator>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25547&amp;oldid=prev</id>
		<title>Egarson at 04:26, 27 August 2009</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25547&amp;oldid=prev"/>
				<updated>2009-08-27T04:26:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:26, 27 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Referential transparency is a very desirable property: it implies that functions consistently yield the same results, given the same input, irrespective of where and when they are invoked. That is, side effects from mutable state have a diminished impact on function evaluation (ideally none!).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Referential transparency is a very desirable property: it implies that functions consistently yield the same results, given the same input, irrespective of where and when they are invoked. That is, side effects from mutable state have a diminished impact on function evaluation (ideally none!).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A leading cause of defects in imperative code is attributable to mutable variables: everyone reading this &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;(except perhaps my mom) &lt;/del&gt;will have investigated why some value is not as expected in a particular circumstance. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A leading cause of defects in imperative code is attributable to mutable variables: everyone reading this will have investigated why some value is not as expected in a particular circumstance. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;And we certainly don't get much help from industry in this regard: introductions to object-orientation (for one) tacitly promote such design, because they often show examples composed of graphs of relatively long-lived objects that happily call mutators on each other, which can be dangerous. However, with good test-driven design (particularly when astutely employing a mock object framework[2]), inordinate mutability can be designed away: object graphs become composed largely of ''immutable objects'', i.e. having readonly/final instance variables (in C#/Java-speak), and constructors become a means with which to perform one-time object initialization. (An interesting emergent property is that instance variables can be made public - gasp! - as the protection afforded by accessors becomes moot: the member is immutable!). The net result is a design that typically yields more numerous, smaller classes (thus better cohesion) and more numerous, smaller functions that act on arguments passed into them, rather than to reference mutable member variables; all of which adds up to a '''much higher degree''' of referential transparency. And, positively nothing will get these ideas as deeply into your bones as to learn a functional programming language, where this model of computation is the norm.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;And we certainly don't get much help from industry in this regard: introductions to object-orientation (for one) tacitly promote such design, because they often show examples composed of graphs of relatively long-lived objects that happily call mutators on each other, which can be dangerous. However, with good test-driven design (particularly when astutely employing a mock object framework[2]), inordinate mutability can be designed away: object graphs become composed largely of ''immutable objects'', i.e. having readonly/final instance variables (in C#/Java-speak), and constructors become a means with which to perform one-time object initialization. (An interesting emergent property is that instance variables can be made public - gasp! - as the protection afforded by accessors becomes moot: the member is immutable!). The net result is a design that typically yields more numerous, smaller classes (thus better cohesion) and more numerous, smaller functions that act on arguments passed into them, rather than to reference mutable member variables; all of which adds up to a '''much higher degree''' of referential transparency. And, positively nothing will get these ideas as deeply into your bones as to learn a functional programming language, where this model of computation is the norm.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25546:newid:25547 --&gt;
&lt;/table&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25546&amp;oldid=prev</id>
		<title>Egarson at 04:25, 27 August 2009</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25546&amp;oldid=prev"/>
				<updated>2009-08-27T04:25:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:25, 27 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - Sutter, H. 2005. &amp;quot;The &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;free lunch is over&lt;/del&gt;: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fundamental turn toward concurrency &lt;/del&gt;in &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;software,&lt;/del&gt;&amp;quot; Dr. Dobb's Journal, http://www.gotw.ca/publications/concurrency-ddj.htm&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - Sutter, H. 2005. &amp;quot;The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Free Lunch Is Over&lt;/ins&gt;: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Fundamental Turn Toward Concurrency &lt;/ins&gt;in &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Software&lt;/ins&gt;&amp;quot;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;Dr. Dobb's Journal, http://www.gotw.ca/publications/concurrency-ddj.htm&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - Freeman S, Pryce N, Mackinnon T, Walnes J. &amp;quot;Mock Roles, not Objects&amp;quot; &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;- &lt;/del&gt;http://www.jmock.org/oopsla2004.pdf&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - Freeman S, Pryce N, Mackinnon T, Walnes J&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. 2004&lt;/ins&gt;. &amp;quot;Mock Roles, not Objects&amp;quot;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, OOPSLA 2004, &lt;/ins&gt;http://www.jmock.org/oopsla2004.pdf&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Edward Garson]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Edward Garson]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25545:newid:25546 --&gt;
&lt;/table&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25545&amp;oldid=prev</id>
		<title>Egarson at 04:23, 27 August 2009</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25545&amp;oldid=prev"/>
				<updated>2009-08-27T04:23:04Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:23, 27 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - Sutter, H. 2005. &amp;quot;The free lunch is over: A fundamental turn toward concurrency in software,&amp;quot; Dr. Dobb's Journal, http://www.gotw.ca/publications/concurrency-ddj.htm&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - Sutter, H. 2005. &amp;quot;The free lunch is over: A fundamental turn toward concurrency in software,&amp;quot; Dr. Dobb's Journal, http://www.gotw.ca/publications/concurrency-ddj.htm&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - Freeman S, Pryce N, Mackinnon T, Walnes J. &amp;quot;Mock Roles, not Objects&amp;quot; - http://www.jmock.org/oopsla2004.pdf&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - Freeman S, Pryce N, Mackinnon T, Walnes J. &amp;quot;Mock Roles, not Objects&amp;quot; - http://www.jmock.org/oopsla2004.pdf&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25544:newid:25545 --&gt;
&lt;/table&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25544&amp;oldid=prev</id>
		<title>Egarson at 04:22, 27 August 2009</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25544&amp;oldid=prev"/>
				<updated>2009-08-27T04:22:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:22, 27 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A leading cause of defects in imperative code is attributable to mutable variables: everyone reading this (except perhaps my mom) will have investigated why some value is not as expected in a particular circumstance. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A leading cause of defects in imperative code is attributable to mutable variables: everyone reading this (except perhaps my mom) will have investigated why some value is not as expected in a particular circumstance. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;And we certainly don't get much help from industry in this regard: introductions to object-orientation (for one) tacitly promote such design, because they often show examples composed of graphs of relatively long-lived objects that happily call mutators on each other, which can be dangerous. However, with good test-driven design (particularly when astutely employing a mock object framework[2]), inordinate mutability can be designed away: object graphs become composed largely of ''immutable objects'', i.e. having readonly/final instance variables (in C#/Java-speak), and constructors become a means with which to perform one-time object initialization&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[3]&lt;/del&gt;. (An interesting emergent property is that instance variables can be made public - gasp! - as the protection afforded by accessors becomes moot: the member is immutable!). The net result is a design that typically yields more numerous, smaller classes (thus better cohesion) and more numerous, smaller functions that act on arguments passed into them, rather than to reference mutable member variables; all of which adds up to a '''much higher degree''' of referential transparency. And, positively nothing will get these ideas as deeply into your bones as to learn a functional programming language, where this model of computation is the norm.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;And we certainly don't get much help from industry in this regard: introductions to object-orientation (for one) tacitly promote such design, because they often show examples composed of graphs of relatively long-lived objects that happily call mutators on each other, which can be dangerous. However, with good test-driven design (particularly when astutely employing a mock object framework[2]), inordinate mutability can be designed away: object graphs become composed largely of ''immutable objects'', i.e. having readonly/final instance variables (in C#/Java-speak), and constructors become a means with which to perform one-time object initialization. (An interesting emergent property is that instance variables can be made public - gasp! - as the protection afforded by accessors becomes moot: the member is immutable!). The net result is a design that typically yields more numerous, smaller classes (thus better cohesion) and more numerous, smaller functions that act on arguments passed into them, rather than to reference mutable member variables; all of which adds up to a '''much higher degree''' of referential transparency. And, positively nothing will get these ideas as deeply into your bones as to learn a functional programming language, where this model of computation is the norm.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Of course, there are caveats to this approach in some contexts; for one, many virtual machine implementations become inefficient when required to manage multitudinous small objects: pragmatism still applies. In object oriented systems, this style often yields better results with domain models (i.e. collaborations and complex business rules) than with server-side processing.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Of course, there are caveats to this approach in some contexts; for one, many virtual machine implementations become inefficient when required to manage multitudinous small objects: pragmatism still applies. In object oriented systems, this style often yields better results with domain models (i.e. collaborations and complex business rules) than with server-side processing.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Sutter, H. 2005. &lt;/ins&gt;&amp;quot;The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;free lunch &lt;/ins&gt;is &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;over: A fundamental turn toward concurrency in software,&lt;/ins&gt;&amp;quot; &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Dr. Dobb's Journal, http://www.gotw.ca/publications/concurrency&lt;/ins&gt;-&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;ddj.htm&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[1] - &amp;quot;The &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Free Lunch &lt;/del&gt;is &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Over&lt;/del&gt;&amp;quot; - &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;DDJ, Herb Sutter&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Freeman S, Pryce N, Mackinnon T, Walnes J. &lt;/ins&gt;&amp;quot;Mock Roles, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;not &lt;/ins&gt;Objects&amp;quot; - &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;http://www.jmock.org/oopsla2004.pdf&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[2] - &amp;quot;Mock Roles, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Not &lt;/del&gt;Objects&amp;quot; - &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Freeman et al&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[3] - Another spin on *Resource acquisition is initialization*?&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Edward Garson]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Edward Garson]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25543:newid:25544 --&gt;
&lt;/table&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25543&amp;oldid=prev</id>
		<title>Egarson at 04:14, 27 August 2009</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25543&amp;oldid=prev"/>
				<updated>2009-08-27T04:14:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:14, 27 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''N.B. This is still a work in progress: any and all comments and suggestions will be warmly received.''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Functional programming has recently enjoyed renewed interest from the mainstream programming community. Part of the reason is because ''emergent properties'' of the functional paradigm foster a pre-disposition for it to better address the challenges posed by our industry's shift toward multi-core[1]. However, while that is certainly an important application, it is not the reason this piece admonishes you to ''know thy functional programming''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Functional programming has recently enjoyed renewed interest from the mainstream programming community. Part of the reason is because ''emergent properties'' of the functional paradigm foster a pre-disposition for it to better address the challenges posed by our industry's shift toward multi-core[1]. However, while that is certainly an important application, it is not the reason this piece admonishes you to ''know thy functional programming''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[3] - Another spin on *Resource acquisition is initialization*?&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[3] - Another spin on *Resource acquisition is initialization*?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Edward Garson]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[http://creativecommons.org/licenses/by/3.0/us/ Creative Commons Attribution 3] &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Back to the [[97 Things Every Programmer Should Know]] home page&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25540:newid:25543 --&gt;
&lt;/table&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25540&amp;oldid=prev</id>
		<title>Egarson: New page: ''N.B. This is still a work in progress: any and all comments and suggestions will be warmly received.''  ----  Functional programming has recently enjoyed renewed interest from the mainst...</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Apply_Functional_Programming_Principles&amp;diff=25540&amp;oldid=prev"/>
				<updated>2009-08-27T04:08:34Z</updated>
		
		<summary type="html">&lt;p&gt;New page: ''N.B. This is still a work in progress: any and all comments and suggestions will be warmly received.''  ----  Functional programming has recently enjoyed renewed interest from the mainst...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;''N.B. This is still a work in progress: any and all comments and suggestions will be warmly received.''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Functional programming has recently enjoyed renewed interest from the mainstream programming community. Part of the reason is because ''emergent properties'' of the functional paradigm foster a pre-disposition for it to better address the challenges posed by our industry's shift toward multi-core[1]. However, while that is certainly an important application, it is not the reason this piece admonishes you to ''know thy functional programming''.&lt;br /&gt;
&lt;br /&gt;
Mastery of the functional programming paradigm can greatly augment the quality of the code you write in other contexts, because if you deeply understand and apply the functional paradigm, your designs will exhibit a much greater degree of ''referential transparency''.&lt;br /&gt;
&lt;br /&gt;
Referential transparency is a very desirable property: it implies that functions consistently yield the same results, given the same input, irrespective of where and when they are invoked. That is, side effects from mutable state have a diminished impact on function evaluation (ideally none!).&lt;br /&gt;
&lt;br /&gt;
A leading cause of defects in imperative code is attributable to mutable variables: everyone reading this (except perhaps my mom) will have investigated why some value is not as expected in a particular circumstance. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.&lt;br /&gt;
&lt;br /&gt;
And we certainly don't get much help from industry in this regard: introductions to object-orientation (for one) tacitly promote such design, because they often show examples composed of graphs of relatively long-lived objects that happily call mutators on each other, which can be dangerous. However, with good test-driven design (particularly when astutely employing a mock object framework[2]), inordinate mutability can be designed away: object graphs become composed largely of ''immutable objects'', i.e. having readonly/final instance variables (in C#/Java-speak), and constructors become a means with which to perform one-time object initialization[3]. (An interesting emergent property is that instance variables can be made public - gasp! - as the protection afforded by accessors becomes moot: the member is immutable!). The net result is a design that typically yields more numerous, smaller classes (thus better cohesion) and more numerous, smaller functions that act on arguments passed into them, rather than to reference mutable member variables; all of which adds up to a '''much higher degree''' of referential transparency. And, positively nothing will get these ideas as deeply into your bones as to learn a functional programming language, where this model of computation is the norm.&lt;br /&gt;
&lt;br /&gt;
Of course, there are caveats to this approach in some contexts; for one, many virtual machine implementations become inefficient when required to manage multitudinous small objects: pragmatism still applies. In object oriented systems, this style often yields better results with domain models (i.e. collaborations and complex business rules) than with server-side processing.&lt;br /&gt;
&lt;br /&gt;
Nevertheless, you should master the functional programming paradigm and apply these principles in other domains: you will find that your object systems (for one) are much closer to their functional counterparts than many would have you believe. In fact, some experts assert that the apex of functional programming and object orientatation are '''merely a reflection of each other''', a form of computational yin and yang.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] - &amp;quot;The Free Lunch is Over&amp;quot; - DDJ, Herb Sutter&lt;br /&gt;
&lt;br /&gt;
[2] - &amp;quot;Mock Roles, Not Objects&amp;quot; - Freeman et al&lt;br /&gt;
&lt;br /&gt;
[3] - Another spin on *Resource acquisition is initialization*?&lt;/div&gt;</summary>
		<author><name>Egarson</name></author>	</entry>

	</feed>