<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>Enfranchised Mind &#187; Robert Fischer</title>
	<atom:link href="http://enfranchisedmind.com/blog/posts/author/candide/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog</link>
	<description>programming, politics, &#38; other religious issues</description>
	<lastBuildDate>Fri, 12 Mar 2010 18:28:20 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!-- podcast_generator="Blubrry PowerPress/1.0.6" mode="advanced" entry="simple" -->
	<itunes:summary>programming, politics, &amp; other religious issues</itunes:summary>
	<itunes:author>Enfranchised Mind</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://enfranchisedmind.com/blog/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:subtitle>programming, politics, &amp; other religious issues</itunes:subtitle>
	<image>
		<title>Enfranchised Mind &#187; Robert Fischer</title>
		<url>http://enfranchisedmind.com/blog/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://enfranchisedmind.com/blog</link>
	</image>
		<item>
		<title>Open Source Update: jQuery PeriodicalUpdater, TestingLabs, GPars, etc.</title>
		<link>http://enfranchisedmind.com/blog/posts/os-update-march2010/</link>
		<comments>http://enfranchisedmind.com/blog/posts/os-update-march2010/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 18:28:20 +0000</pubDate>
		<dc:creator>Robert Fischer</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=2353</guid>
		<description><![CDATA[I've done a fair bit of fairly small open source updates recently.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve done a fair bit of fairly small open source updates recently.</p>
<ul>
<li><code>jQuery PeriodicalUpdater</code>: The main function now returns a handle that can be used to call <code>stop()</code>, thereby ignoring any updates that may come back and preventing future updates from being sent.</li>
<li><code>TestingLabs</code>: I released TestingLabs 0.4 to work with Grails 1.2.0.  Had a bug with versioning under Grails: <A href="http://jira.codehaus.org/browse/GRAILSPLUGINS-2023">More info on JIRA</a>.</li>
<li><code>Presentations</code>: I&#8217;m now storing the slides for my presentations on GitHub.  They&#8217;re under a Creative Commons License.</li>
<li><code>ClosureBridge</code>:  This is a tiny library (up on <a href="http://repo.smokejumperit.com">the repo.smokejumperit.com Maven repo</a>) that provides a link between Groovy&#8217;s Closures and Callable/Runnable/Java code.</li>
<li><code>Fun with GPars</code>: A small library where I was experimenting with GPars</li>
<li><code>GPars</code>: Submitted a fix and generally been discussing things with the GPars community (and by that, I mean Vacalv Pech)</li>
</ul>
<p>See <a href="https://github.com/RobertFischer">my GitHub page</a> for more info.</p>
<hr />
This post was by <a href="http://enfranchisedmind.com/blog/posts/author/candide/">Robert Fischer</a>, written on March 12, 2010.<br />
Comment on this post: <a href="http://enfranchisedmind.com/blog/posts/os-update-march2010/#respond">http://enfranchisedmind.com/blog/posts/os-update-march2010/#respond</a><br />
Public Permalink: <a href="http://enfranchisedmind.com/blog/posts/os-update-march2010/">http://enfranchisedmind.com/blog/posts/os-update-march2010/</a>
<hr /><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png" /></a><br />This article was a post on <a href="http://enfranchisedmind.com/blog">the EnfranchisedMind blog</a>.  <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">EnfranchisedMind Blog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://enfranchisedmind.com/blog/" property="cc:attributionName" rel="cc:attributionURL">Robert Fischer, Brian Hurt, and Other Authors</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.<p style="display:none;">(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (66.30.198.4) )</p></small>]]></content:encoded>
			<wfw:commentRss>http://enfranchisedmind.com/blog/posts/os-update-march2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scala: Post-Functional, Post-Modern, or Just Perl++?</title>
		<link>http://enfranchisedmind.com/blog/posts/post-functional-scala/</link>
		<comments>http://enfranchisedmind.com/blog/posts/post-functional-scala/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 03:30:54 +0000</pubDate>
		<dc:creator>Robert Fischer</dc:creator>
				<category><![CDATA[Classic]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming Language Punditry]]></category>
		<category><![CDATA[fp]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=2330</guid>
		<description><![CDATA[Protip to Scala people: If one of the fundamental stunts of a style is pervasive in all the code but yours, you're not in the same style of programming.]]></description>
			<content:encoded><![CDATA[<h3>Let&#8217;s start with some background.</h3>
<p><a href="http://enfranchisedmind.com/blog/posts/scala-not-functional/">I complained that Scala did not seem to be very functional to me</a>, but I didn&#8217;t really know how best to express what was fundamentally wrong with it.  I did know that if <a href="http://www.artima.com/scalazine/articles/goals_of_scala.html">&#8220;functional languages have a fixed set of features&#8221; like Scala&#8217;s creator, Odersky, claims</a>, then it wasn&#8217;t simply &#8220;first-class functions in there, function literals, closures&#8221;, &#8220;types, generics, [and] pattern matching&#8221;.  Scala has missed the functional boat in some basic way.</p>
<p>After a kerfuffle in the comments, <a href="http://enfranchisedmind.com/blog/posts/what-is-a-functional-programming-language/">Brian enlightened us all by telling us what is a functional programming language</a>.  His explanation (while being a self-admitted generalization) is summarized as follows:<br />
<blockquote>So, what is it that differentiates the functional programming languages from all the other programming languages? It is simply this: the functional programming languages use, as their fundamental model of computation, the lambda calculus, while all the other programming languages use the Turing machine as their fundamental model of computation.</p></blockquote>
<p>Six months later, <a href="http://www.scala-lang.org/node/4960">Odersky responds with a very interesting post</a>, which actually agrees that Scala is not a functional language in Brian&#8217;s sense, but instead argues that any language is functional if it &#8220;makes programming centered around functions easy and natural&#8221;.  He then runs through a list of features which is in common with functional languages, noting that Scala has them within handwave enough (more on that later).  He ends wishing that people would &#8220;stop thinking of functional programming as a different, novel, or exotic way to code&#8221;.  Even more, though, Scala is apparently &#8220;an early example of a new breed of postfunctional languages&#8221;.</p>
<h3>And that gets us to this blog post.</h3>
<p>First of all, Odersky is still missing the point.  It&#8217;s not about whether you use <code>fold</code>, <code>map</code>, and <code>iter</code>, or whether you can write closures easily.  It&#8217;s not even really about pure functions vs. side-effects.  To code in a functional style is a fundamentally different way of thinking about problems: instead of thinking about problems as nouns that are doing things, functional programming views a problem as a series of transformations to the world which results in an answer.  This is why functional programming is considered &#8220;a different, novel, or exotic way to code&#8221;: it <em>is</em> a different, novel, and (as of yet) exotic way to code.  It&#8217;s as different, novel, and exotic from OO as OO was from procedural.  It&#8217;s a different way of thinking about the entire issue.  You can <a href="http://itmmetelko.com/blog/2008/02/23/functional-programming-immutable-objects-explained-irc-style/">check out this snippet of an IRC conversation from #ocaml</a> for more on that.</p>
<p>The paragon of this way of programming is <a href="http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/">point-free programming</a>, where you are quite literally building up a mega-function that describes how your program works, and then executing that one, single function when you run that program.  If your language doesn&#8217;t lead people to re-discover point free programming at least in the small, then the language really isn&#8217;t taking function manipulation and functional language type conceptions seriously.  And that&#8217;s the case with Scala: even Odersky admits that in Scala, &#8220;currying is more verbose and much less used than in other functional languages&#8221;.  (Protip to Scala people: If one of the fundamental stunts of a style is pervasive in all the code but yours, you&#8217;re not in the same style of programming.)</p>
<p>What really gets me, though, is the claim that Scala is &#8220;an early example of a new breed of postfunctional languages&#8221;, because aside from the static typing, all the language features that Odersky trots out already exist in Perl.  It&#8217;s hard to be a vanguard of a new breed of programming languages when there&#8217;s prior art <a href="http://history.perl.org/PerlTimeline.html#1980s">from the 1980s</a>.</p>
<p>Don&#8217;t believe me?  <a href="http://www.amazon.com/exec/obidos/ASIN/1558607013/lovespiralsof-20">The existence of a book on the topic unconvincing</a>?  Then let&#8217;s run the list of functional language features from Odersky.</p>
<ul>
<li>Functions as first class values: <em>check</em>.

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> apply<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span>  <span style="color: #666666; font-style: italic;"># Take a function as an argument no problem</span>
  <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> times2<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span>  <span style="color: #666666; font-style: italic;"># Create a function to take</span>
  <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
apply<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\&amp;times2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Convenient closure syntax: <em>check</em>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$x</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
apply <span style="color: #009900;">&#123;</span> <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #0000ff;">*$x</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#125;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$times_x</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">sub</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #0000ff;">*$x</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$times_x</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>List comprehensions: <em>check</em>.  (See <a href="http://perldoc.perl.org/index-functions-by-cat.html#Functions-for-list-data">perlfunc on list data</a>.)
</li>
<li>&#8220;Curried&#8221; function definitions and applications: check-ish.<br />
Okay, so calling this a &#8220;check&#8221; on Scala is a bit of a reach (<a href="http://enfranchisedmind.com/blog/posts/scala-not-functional/#currying">cite</a>, <a href="http://enfranchisedmind.com/blog/posts/scala-not-functional/#comment-35168">cite</a>, <a href="http://enfranchisedmind.com/blog/posts/scala-not-functional/#comment-35550">cite</a>, although <a href="http://enfranchisedmind.com/blog/posts/scala-not-functional/#comment-35231">note this</a>—<a href="http://www.codecommit.com/blog/scala/function-currying-in-scala">here</a> is a more sympathetic run-down on Scala currying).  Ignoring the <code>foo(2,_:Int)</code> syntax for a moment, we can implement basically the same style of &#8220;&#8216;curried&#8217; function definitions&#8221; such as Scala&#8217;s <a href="http://www.scala-lang.org/docu/files/api/scala/List.html#foldLeft%28B%29">List#foldLeft</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> add <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$x</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">return</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$x</span> <span style="color: #339933;">+</span> <span style="color: #000066;">shift</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;"># Okay, so you do need an extra -&gt;</span></pre></div></div>

<p>In the case of our <code>apply</code> function above (where we take a function as the first argument), it&#8217;s even easier.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">apply <span style="color: #009900;">&#123;</span> <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #0000ff;">*$x</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#125;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, there isn&#8217;t really argument skipping (i.e.: <code>foo(_:Int,3)</code>) as a syntax feature, and there isn&#8217;t a built-in <code>curry</code> function, but if you want Scala&#8217;s <code>Function.curried</code> in perl, here it is:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This code released under Creative Commons 0 and WTFPL.</span>
<span style="color: #000000; font-weight: bold;">sub</span> curry<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;@</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$f</span><span style="color: #339933;">,</span><span style="color: #0000ff;">@args</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span> 
  <span style="color: #000066;">return</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$f</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@args</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> add<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">return</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$curried</span> <span style="color: #339933;">=</span> curry<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\&amp;add</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000066;">print</span> <span style="color: #0000ff;">$curried</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Lazy evaluation: <em>check</em>.  See <a href="http://search.cpan.org/~jesse/Scalar-Defer-0.23/lib/Scalar/Defer.pm">Scalar::Defer</a> for lazy val equivalents and <a href="http://search.cpan.org/~genie/Tie-LazyList-0.05/LazyList.pm">Tie::LazyList</a> for lazy seq equivalents.  People generally use a <a href="http://www.perldesignpatterns.com/?LazyEvaluation">double-return approach</a> for generators (which I realize are different than lazy seqs and only kinda-sorta lazy).
</li>
<li>Pattern matching: <em>check</em> (okay, check-ish).  See <a href="http://perldoc.perl.org/Switch.html">Switch</a>.  The decomposition isn&#8217;t there, which is the biggest weakness.  But the general cumbersomeness and lack of real algebraic data types hamstrings the coolest parts of pattern matching anyway, so I&#8217;m calling it a draw. (This should be read as a generous and sympathetic ruling for Scala: Cedric Beust, for instance, rails against pattern matching/case classes and says &#8220;<a href="http://beust.com/weblog2/archives/000490.html">it&#8217;s hard for me to see case classes as anything but a failure</a>&#8220;.)</li>
</ul>
<p>In addition, perl&#8217;s got a few features in its favor for functional programming, like more flexible arguments, <a href="http://en.wikipedia.org/wiki/Autovivification">autovificiation</a>, list/argument coercion, and dynamic symbol table mangling. Since perl also has OO capabilities, perl is <em>at least</em> as convincing a &#8220;post-functional language&#8221; as Scala.  But there&#8217;s even more in common between the two than that.</p>
<p>Odersky&#8217;s &#8220;post-functional language&#8221; is really a subtype of <a href="http://www.wall.org/~larry/pm.html">Larry Wall&#8217;s &#8220;post-modern language&#8221;</a>: it&#8217;s an attempt to create a language that is a grab-bag of multiple paradigms.  And when you do that, you&#8217;re just begging for the complaints that you hear leveled against both perl and Scala: it&#8217;s too complicated, its syntax is weird, it&#8217;s too magical, people write in entirely distinct subsets of the language, etc. (<a href="http://creativekarma.com/ee.php/weblog/comments/my_verdict_on_the_scala_language/">cite</a>, <a href="http://www.weiqigao.com/blog/2008/03/24/scala_still_uncomfortable_after_five_years.html">cite</a>, <a href="http://neopythonic.blogspot.com/2008/11/scala.html">cite</a>)  Now, those who master the language (or master their favorite subset of it) love the <a href="http://en.wikipedia.org/wiki/There's_more_than_one_way_to_do_it">TIMTOWTDI</a> aspect.  But it also means that the language is left as a jack-of-all-trades, master of none.  Yes, Scala and perl integrate a lot of powerful tools from functional languages—but learning OCaml still blew my mind, despite knowing perl for years.  As I started off saying, Scala is not a functional programming language. It is a statically typed object oriented language with closures.</p>
<p>Now, there is a sense in which Odersky is really onto something.  The world of programming is forever transformed with closures and list comprehensions as being mandatory for new high-level languages, even if they&#8217;re otherwise object oriented.  And software developers are going to need how to work with them effectively if they want to read code moving forward.  Yes, after 20+ years, the rest of the programming world finally caught up to one of perl&#8217;s fundamental insights.</p>
<hr /><h2>Comments</h2><ul><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37346">March 7, 2010</a>, <a href='http://blog.barrkel.com/' rel='external nofollow' class='url'>Barry Kelly</a> wrote: Functional programming optimizes for different things than OO does. That means for different problems, you want to take different approaches, depending on your level of familiarity with the problem domain and the solution strategies. And thus for a language that supports both paradigms, different people will often end up using different subsets of the language. But I don't think this is necessarily a damning criticism. Our problems are bigger and more compositional. We need languages that have the semantic richness to support different solution strategies.

An example. There's an isomorphism between OO polymorphism / dynamic dispatch, and algebraic data types / pattern matching and destructuring. OO lets you add subclasses as late as dynamically at runtime. ADT lets you add functions freely, and such functions are more composable that they're dealing with well-defined quantities.

More generally, OO is about defining loosely bound protocols, while FP is more about flexibly defining transformations over tightly defined structures. But if you want to write a solution that's natural for one paradigm in the other, you end up re-inventing and poorly reinventing the other paradigm.

In a comment somewhere else out in the ether, I made an argument that getting FP to work as well as a dynamically typed late bound language like Ruby for fast-iterating web solutions that join together multiple independently developed and fast-iterating modules, you'd end up writing what amounted to a dynamic language just to avoid the brittleness that comes from the over-specification that naturally falls out of static typing.

I will agree that e.g. currying is useful, as it decomposes the concept of functions of arbitrary arity into what amounts to a linked list of unary functions; and this is particularly handy for programming in a point-free style. But point-free mostly helps (I would assert) on problems where what you need to do is create an algorithm, where little helpers like fold, map, memoize etc. are your bread and butter. But not all problems are like that, not by a long shot.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37347">March 7, 2010</a>, Ittay wrote: "because aside from the static typing, all the language features that Odersky trots out already exist in Perl"

That is a big 'aside'. You also forgot that Scala runs on the JVM and Perl not.  Not to mention that I think it is common consensus that Perl  code is very unreadable. 

So Scala is a language that combines some FP characteristics with OO, running on the JVM and with a readable (and scalable) syntax. That's a big win for me.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37348">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: I will freely grant that there's a lot to be gained by having some flexibility, but languages that end up trying to play in multiple sandboxes end up either doing one part badly (e.g. OCaml and OO, Scala and functional).  The answer seems to be using multiple languages for different contexts, not trying to create the One True Language with all the features of the world in it.  That's why when I encounter a programming problem, I will generally reach for perl, Groovy, or OCaml/F#: which one I go for depends on the nature of the problem.  But I don't long for a day when there's a language that has all the features of perl, Groovy, and OCaml, because they're fundamentally incompatible takes on the process of programming.  The strongly opinionated natures of these languages is precisely what makes them so good.  Scala's lack of strong opinions is what's frustrating me.

Well, that and having to explain to Java devs over and over again at No Fluff events that learning Scala does not mean learning to program in a functional style.  I mean, you <em>can</em> code Scala in a functional style, but <a href="http://enfranchisedmind.com/blog/posts/this-is-your-brain-this-is-your-brain-on-ocaml/" rel="nofollow">I can code Java in a functional style</a>.  And yes, it's a <em>bit</em> easier to code in a functional style in Scala, but learning Scala is no more learning functional programming than learning perl is learning functional programming.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37349">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: The "readable (and scalable) syntax" bit is a big assumption—at least to my ear, there's as much concern about the readability of Scala code as there is about perl code.  And how much Scala's static typing really helps vs. how much it gets in the way is a matter of contention. But both of those are an aside.

The purpose of this post was not to say that people should stop coding Scala and start coding perl: if you're still futzing around in Java-land, Scala (like Groovy and JRuby) is a productivity huge win that can leverage your existing infrastructure.  Groovy's probably the semantically closest, JRuby's the conceptually cleanest, and Scala keeps the fetishized complexity and the BDSM aspects of Java.

No, this wasn't a call to go back to perl.  The purpose of this post is to show that the idea of merging closures with imperative isn't a new idea, and that Scala is no more a functional language than those languages (like perl) which merged the concepts beforehand.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37351">March 7, 2010</a>, <a href='http://www.illegalargument.com' rel='external nofollow' class='url'>Richard Vowles</a> wrote: I've been saying this for 6 months at least now - Scala and Perl have way more in common than Scala has in common with any other language. Including a tendency towards unreadability.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37352">March 7, 2010</a>, Marc wrote: "It’s as different, novel, and exotic from OO as OO was from imperative."

OO is as imperative, if not more so, than C.  I assume you meant procedural?

Also, there is nothing new in programming languages, period.  Everything you see in "new" languages was figured out at least 20 years ago.  So,  all language designers are just mixing and matching as they see fit.  So it's unfair to single out Scala in this regard.  While you're at it, go after Groovy, Clojure, Boo, F#, etc.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37353">March 7, 2010</a>, <a href='http://www.cirrusmachina.com/' rel='external nofollow' class='url'>Nick Bauman</a> wrote: I find the description "combines some FP characteristics with OO" problematic when discussing hybrid Functional / OO languages. The more I use one of my favorites of these languages, Python, the more I find the OO aspects receding into the background and the functional ones coming to the fore. It seems to me that <b>Functional is OO "done right"</b> where when I do use OO in them, it's not as heavyweight and seems more natural. I think the key is that in most traditional OO languages the concept of what a type is tends to be much narrower. Can you confirm this in your experience?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37354">March 7, 2010</a>, Thomas Heywood wrote: Robert, I admire your ability to "professionally blog." You delivered no useful content, but you did it with inspiring attention to page hits and comment controversy.

Yes, Scala is a multiparadigm language. Yes, Perl is one too. Yes, they both share features from Common Lisp. That's not really worth my or your time.

But you cleverly used the confrontational tone to make the blatant non-issue into a controversial <i>issue</i>. You cleverly used Blogosphere's beloved "Scala" and "Perl" tags in a <i>single</i> article.   You  nagged about a minor syntax issue like it was life-or-death as only a true master-of-functional-programming-who-blogs-more-than-he-actually-programs can.

Bob, you're my hero - a true <i>Dilbert's</i> Wally in flesh. A guy without any real code to show - but who "realigns the tone of existing projects" and whose "technical leadership focuses on pragmatic communication" like there's no tomorrow.

Wally - sorry, Robert - do you think you could write some posts on how to professionally sell bull and call it "technical accomplishments?" Many of us CompSci majors would like to get in on this money for nothing scheme.

Unless, of course, you're not comfortable writing about things you actually do know a little about.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37355">March 7, 2010</a>, Nilanjan Raychaudhuri wrote: Well I believe it is possible to write unreadable code in any language and I am not sure blaming any programming language for that is a good idea.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37356">March 7, 2010</a>, <a href='http://www.codecommit.com/blog' rel='external nofollow' class='url'>Daniel Spiewak</a> wrote: Throwing out static typing fundamentally changes what Scala has to offer.  In a sense, I agree with you that if we completely threw out Scala's type system (and <i>all</i> that it entails), then we would end up with a language which improves very little (if at all) over languages like Perl or Ruby.  However, that first step is a doozy and not really fair.

Consider a snippet like this:

<pre lang="scala">"123".to[Int]     // =&gt; 123
".+".to[Regexp]       // =&gt; /.+/
true.to[Regexp]       // compile error!</pre>

There's a lot of magic going on here, all of which is made possible by the static type system.  In fact, while this sort of thing is *possible* in a dynamic language with open classes (like Ruby), the implementation will be ugly, unscoped, brittle and difficult to extend.  In Scala, the implementation looks something like this:

<pre lang="scala">trait Converter[-A, +B] {
  def apply(a: A): B
}

implicit object StringToInt extends Converter[String, Int] {
  def apply(str: String) = str.toInt
}

implicit object StringToRegexp extends Converter[String, Regexp] {
  def apply(str: String) = Regexp(str)
}

implicit def toSyntax[A](a: A)= new {
  def to[B](implicit conv: Converter[A, B]) = conv(a)
}</pre>

This is taking advantage of a feature which Scala inherits from Haskell called <i>typeclasses</i>.  This is an feature which is inherently tied to static typing and is often very difficult to emulate in dynamic, so-called "more flexible" languages.  The real magic of this is two-fold.  First, it's scoped, and so we actually have to import these members before they start messing with our objects.  It's hard to over-state how important this is to keeping such extensions from devolving into intractable monkey-patching.  Second, it's extremely extensible.  What if we want to add another conversion from Foo to Bar?  Just define it ourselves as an implicit value in scope!  Or, if we <i>don't</i> want the implicit syntax, we can always specify the conversion explicitly:

<pre lang="scala">// off in *our* code, separate from the converter lib
implicit object StringToBool extends Converter[String, Boolean] {
  def apply(str: String) = str.toBoolean
}

"true".to[Boolean]     // =&gt; true
"false".to(StringToBool)       // =&gt; false</pre>

I'm not even going to try to imagine how to do this sort of thing in Perl.  Even in Ruby, which usually makes monkey-patching quite simple, the implementation still ends up extremely nasty:

<pre lang="ruby">class Object
  def to(target)
    case target
      when :fixnum
        if self.class == String
          self.to_i
        else
          raise "Unknown conversion: String -&gt; :fixnum"
        end

      # ...
    end
  end
end</pre>

...and, you get the picture.  You could probably do this in a nicer way, but it would still end up being fragile, unscoped and virtually impossible to extend.  

<i>This</i> is what you're throwing away when you discard the type system, not some unreliable correctness "guarantee".  And if I can throw together an example like this in a blog comment in just a few lines of Scala, imagine what can be done in a non-trivial system with real requirements.  The type system is an intrinsic part of Scala's power and expresivity.  Remove it and you're not even looking at the same language.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37357">March 7, 2010</a>, <a href='http://www.codecommit.com/blog' rel='external nofollow' class='url'>Daniel Spiewak</a> wrote: While currying and point-free aren't as syntactically clean as they could be in Scala, they are certainly still used (I use those features all the time).  Does this make Scala less "functional" than Haskell or ML?  Yeah, probably (I've made that argument in the past).  Does it mean that Scala is no more functional than Perl?  Absolutely not.

Theoretically speaking, currying is possible in <i>any</i> language which supports closures (alblue, if you're reading, yes I do mean "closure" and not "lambda").  You can even define a curry function in C++, though the obfuscated template mess it entails makes it nigh unreadable.  Lambdas ("closures" if you will) and function values do not a functional language make.  C has function values, and I don't think anyone who understands the debate will argue that it is "functional".  Ruby has function values <i>and</i> lambdas, but they are fundamentally different constructs and produce different values (just like in Perl).  Again, not a functional language (though you can use many patterns which find their roots in FP, like <code>map</code> and <code>fold</code>).

My point is this: you can't go out of your way to link FP to point-free and lambda calculus and then turn right around and claim that Perl and Scala are in the same league.  Scala's unified functions and function values alone should be sufficient to overturn that one.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37358">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Yes, I meant procedural.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37359">March 7, 2010</a>, Martin wrote: You really can't claim "perl has had _____ since the 80's" and then point to books about Perl 5. Perl 25 years ago is *very* different than it is now. 

Your point that Scala and perl are similar is well taken, but I'm not totally clear why this is bad for Scala or Perl. The way Perl 6 is going towards a virtual machine, I wouldn't be surprised to see Perl and Scala and Java running together on a JVM sometime soon.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37360">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: I'm not saying it's bad for either Scala or perl to be similar to each other — on the point of similarity, I'm simply saying that in the ways Odersky argues Scala is "functional", perl is just as functional, and so I'm still unconvinced that Scala deserves to be called a "functional language".  You don't hear people listing off the functional languages like: "Haskell, OCaml, perl, Lisp...".  So to hear people say "Haskell, OCaml, Scala, Clojure" just gets my goat.

I'm also saying that on the point of similarity, it shouldn't be a surprise that we're getting similar unreadability/complexity complaints about Scala as we got about perl, since they are so similar.

I heard something about perl getting onto the JVM for AppEngine, but can't find additional info on it.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37361">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: In what ways do Scala's unififed functions and function values outperform perl?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37362">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Note the point I'm arguing: I'm arguing that Scala is no more a functional language than perl is.  Functional languages can be dynamic (e.g. Clojure), so static vs. dynamic typing is irrelevant to the point I'm trying to make.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37363">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: You've earned a special spot in my heart: this is my new favorite flame of all time.

I mean, the fact that you say I don't have "any real code to show" just goes to show that you're not paying attention, because you've somehow managed to miss my long trail of open source projects.  And you kinda missed the boat on the entire fundamental question: "Is Scala a functional programming language?"  But still, the Dilbert references, the accidentally-on-purpose "slip of the keyboard", and the general long-suffering tone is really nicely done.  A+</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37364">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Oh, and you're fair on the dating thing.  It's hyperbolic to conflate Perl 1 with Perl 5, although I honestly have no idea how far back I can go in perl and still have my code samples work.  If you find out, let me know.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37365">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Brian Hurt, the co-blogger here on EnfranchisedMind, is theoretically working on a post about how OO is fundamentally broken.  I'll leave that to him.

My experience has been that many of the Gang of Four design patterns just aren't relevant anymore, and inheritance is something I'm extremely reluctant to use and much more aware of its difficulties.  I'm not sure exactly what it would mean to say that "the concept of what a type is tends to be much narrower", but I certainly have a much thinner type hierarchies in the world of functional programming.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37366">March 7, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Oh, not to mention the cite of enterprise-ese from SmokejumperIT.com.  I mean, that's some real attention to detail for the zingers.

In all seriousness, this is my favorite flame of me of all time.  Thanks!</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37367">March 7, 2010</a>, <a href='http://www.naildrivin5.com/blog' rel='external nofollow' class='url'>Dave</a> wrote: 
FWIW, I really dug this post.  As to the topic at hand, I'm not even sure what point there is to saying Scala is or isn't "functional".  The only real purpose seems to be to make it easy to show how awesome Haskell is by point out Scala's perceived shortcomings as a functional language.


For my money, Scala is simply "Java: The Next Generation".  A general-purpose, statically-typed, object-oriented language that has broad applicability to many problem domains.


Arguing "what is functional" might be a fun exercise, but it's not really going to lead us anywhere; look at most n-tier Java applications: to say they are object oriented would be a vast overstatement.  Java is object-oriented in that it's main means of organizing code are around classes and objects (which is exactly the same as in Scala), but most systems still end up using OO only when it helps, and throwing it for imperative/procedural stuff when it makes sense to do so.


I would be willing to bet that Scala will be much the same way; the code <b>inside</b> our classes might be much more functional (simply because its' simply worth-it to do in Scala, whereas it's not terribly so in Java), but I don't see it ushering in some functional utopia (LISP has had, oh, I don't know, <i>the entire history of the field of computer science</i> to usher this in and largely failed [no offense to LISP]).

Scala is an escape route from Java's cruftiness without having to bend your mind or prejudices <b>too</b> much.  Much as Java was to C++.
</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37368">March 7, 2010</a>, <a href='http://www.kaleidic.com' rel='external nofollow' class='url'>Tracy Harms</a> wrote: The most interesting sentence in your post, to me, was this:

<em>If your language doesn’t lead people to re-discover point free programming at least in the small, then the language really isn’t taking function manipulation and functional language type conceptions seriously.</em>

This has me wondering, though, about your agreement with Brian that the key quality is reliance on lambda calculus as the model of computation. Not that I'm convinced we need a "key quality." It just looks to me that the range of languages you have in mind would not be identified through this criterion.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37369">March 8, 2010</a>, joe poki wrote: what's up with these groovy people nowadays? groovy++ is 10 trillion times faster than scala actors, now this piece.

your rant could be summarized like I Do Not Like Scala. Look, I get that.

But I must say it's funny that you use this patronizing tone with  Odersky as he was a n00b who has no idea about languages and then once you get a trollish comment, you go on and post it everywhere: OMG somebody was responding to my trollish post in a trollish manner, what a surprise?

as for your post:
just because a language can be used in a certain way (or certain language toolsets can be simulated in that language) that does not mean that the users  will find that specific style idiomatic. What matters is the style you will meet the most while reading or writing code in that specific language (hack, even java has various functional libraries: lambdaj, functionaljava etc. but how many people would consider code written with these library java-like?).  

When people say that scala is "kinda functional", what they really mean is that the language is nudging you into that direction (preference for pattern matching, option type, final variables, map, foreach,closures, partial functions etc.).  And this nudging towards the functional style is what makes scala "postfunctional".  

(other features responsible for the "scala feel" but not directly related to the functional thing: static typing w/ type inference, a powerful type system, xml literals, implicit converions, case classes, mixins + various actor libs etc.)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37370">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: My issue isn't with people saying Scala is "kinda functional".  It's saying it's a "functional language".  I've heard people say they want to learn Scala b/c then they'll know functional programming, and that's just wrong.  Worse, I've heard people write off functional programming because they didn't like Scala.  This means that the misconception that Scala is a functional language is hurting <em>real</em> functional language adoption and hindering people's advancement as software developers by making them think they know functional when they don't.  So I'm trying to reinforce the barrier between real functional languages and languages with closures.

I'm not particularly knocking Odersky here: what he's done with Scala is pretty impressive.  But he's clinging to a title that Scala doesn't deserve.  While I appreciate the move with "postfunctional", I'd be a big fan if it also meant he'd give up "functional" — but he's just taking both titles on.  In so doing, he's diluting what we mean by a "functional language", and that's just not helpful to anyone involved.

The evidence does seem to be that Odersky doesn't really know functional languages.  Or, if he does know them, he knows them academically or intellectually, and doesn't really grok them.  But you can't be an expert on everything, and I get that. 

This whole conversation is really kind of sad.  There's such an extreme dichotomy here: the assumption seems to be that if you criticize a language, you must hate it.  I don't hate Scala: Scala is what Java should be.  It's finally a competitor to C# on the JVM — the advanced capabilities of C# have been downright embarrassing for a long time, and Scala evens the playing field.

I'm just criticizing the way we talk about this language, and providing counter-evidence to some of the claims made about it.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37371">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Which languages do you see as missing one of the two qualities?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37372">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: As <a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37370" rel="nofollow">I will say below</a>, my issue is mainly one of vocabulary and pedagogy, because I'm frustrated with the murky waters that such marketing-speak has created.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37374">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: <b>PS:</b> From someone who has been there <i>(remember: I'm a static typing fan, too)</i>: If you want to debate static typing usefulness vs. dynamic typing usefulness, don't argue that it's hard to implement type safety in a dynamically typed language.  It doesn't win you any points with the dynamic language crowd, because they've already accepted they don't need it.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37376">March 8, 2010</a>, Peter Lewerin wrote: Daedalus and his son Icarus were imprisoned by King Minos, and made themselves wings out of wax and feathers to escape. Before they took off from the island, Daedalus warned his son not to fly too close to the sun. The sensation of flying made Icarus forget the warning and he soared higher and higher.  Eventually the wax melted and he fell into the sea.

A programmer can escape the prison of procedural programming using functional programming, but going for the purest form of FP isn't really a sustainable goal.  Most likely, these wonktional programmers will melt their wings by straying too close to the realm of mathematics and plunge to their deaths.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37377">March 8, 2010</a>, Thomas Heywood wrote: <cite>And you kinda missed the boat on the entire fundamental question: “Is Scala a functional programming language?"</cite>

Scala is a multiparadigm language that supports procedural, functional and object-oriented programming. We've had that since 1950s and Lisp.

Now, what was the fundamental question again?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37378">March 8, 2010</a>, Thomas Heywood wrote: (Mea culpa: we've only really had it supplied with the language since 70s, when Lisp machines took off. Still, a blatant fact is blatant, no matter how much you blog it into shape.)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37379">March 8, 2010</a>, Vassil Dichev wrote: Robert, if you like Perl, that's nothing to be ashamed of :-)

Seriously, I think your article is thought-provoking, if a little controversial. Still, there are several things I disagree with.

First of all, I have interpreted Odersky's article in the spirit of: "OK, I don't insist on calling Scala a functional language".

One important piece you didn't mention was immutable data structures. Perl doesn't scale very favorably here. Was this on purpose? I find it important not just what a language *can* do, but also what it *cannot* (easily) do. Mutation and scoping are some of the things Scala restricts rather successfully.

I also don't find how the fact that Perl has flexible arguments, autovivificiation, list/argument coercion, and dynamic symbol table mangling makes it more functional. Does Haskell have these? Do you consider Haskell functional?

Then I also don't see many people argue that Java is object-oriented. By the same reasoning, it's not- it certainly has types that are not objects, and you can certainly write in a procedural style in Java (unfortunately some people really do).

Also, I don't see you arguing that OCaml is not object-oriented, because it's also considered a multi-paradigm language. I see that in one of your comments you agree that OO is poor in OCaml, which is fair enough, but I think some OCaml users wouldn't agree with you on this count either.

I most emphatically agree that if you "know" how to write working Scala code, this doesn't mean you know all about functional programming. But I disagree that this harms "real" (read purer) functional languages any more than Java harms "real" object-oriented languages (whatever they are).

In the end, I'm also fine with the definition of "statically typed object oriented language with closures".</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37380">March 8, 2010</a>, Vassil Dichev wrote: I've just read some of the blog posts you've linked to, and it's quite telling that <a href="http://creativekarma.com/ee.php/weblog/comments/my_verdict_on_the_scala_language/" rel="nofollow">two</a> of <a href="http://www.weiqigao.com/blog/2008/03/24/scala_still_uncomfortable_after_five_years.html" rel="nofollow">them</a> complain that Scala is <em>too</em> functional, while you complain that it's not functional <em>enough</em>.

I think this is the problem with Scala: you can't appease everybody without any mental effort on their part to get used to the new style of programming.

And I think the same can be said of OCaml. I also think OCaml would be a wonderful language to learn (and I might try it soon).</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37382">March 8, 2010</a>, Paul Kaletta wrote: All of your examples should work with any version of Perl 5, which came out in 1994.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37384">March 8, 2010</a>, Martin Odersky wrote: Robert:

Your blog and even more so your comments make it sound as if I have no clue about what functional programming is. So, it must be because of a series of freak accidents that I organized ICFP, am a member of the IFIP working group on functional programming and am a member of the editorial board of the Journal of Functional Programming. And I even published quite a bit on lambda calculus, too :-). 

Seriously, I stand completely by my article on postfunctional programming. I believe your post here has added nothing of substance to the discussion. 

http://www.scala-lang.org/node/4960</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37386">March 8, 2010</a>, joe poki wrote: if you cite every single well-known post that dismisses scala one way or another and you go on and say "it’s too complicated, its syntax is weird, it’s too magical, people write in entirely distinct subsets of the language", then people will rightly assume you do not like scala, I do not get it why you are surprised (notice, I did not say you hate it, just that you dislike it).

see, the patronizing stuff again "Odersky doesn’t really know functional languages".

As I tried to point out: what matters is how a language is used and what's considered idiomatic and in that sense scala definitely has some functional feel to it (and no, it's not just about closures or foreach, but preference for pattern matching, option types, final variables, map, foreach,closures, partial functions etc. etc.).</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37387">March 8, 2010</a>, <a href='http://www.kaleidic.com' rel='external nofollow' class='url'>Tracy Harms</a> wrote: To the best of my knowledge, Factor, Joy, FL, and J are languages that favor anonymous arguments (and/or emphasize composition of functions) while lacking reliance on lambda expressions.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37388">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: If you're up for not calling Scala a "functional programming language", tell Odersky.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37389">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: It's not patronizing to say someone doesn't know something, or to disagree with the way someone is using language.  That's just not what patronizing speech is.  It'd be patronizing if I started explaining to Odersky what closures are and how they're supposed to work, or <a href="http://tinyurl.com/yk9nas8" rel="nofollow">if I sent you off to look at this link</a>.  <em>That</em> would be patronizing.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37390">March 8, 2010</a>, Thomas Heywood wrote: <cite>Your blog and even more so your comments make it sound as if I have no clue about what functional programming is.</cite>

Martin, hate to break it to you, but all you ever did was bring effective functional programming to a mainstream platform for the benefit of industry and academia.

Call me back when you write a wrapper library or two, learn the persistence API of  a web framework, or <cite>realign the tone of existing projects.</cite></li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37391">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: That's cool that you're so involved.  Ultimately, though, our problem is boiling down to one of language.  If Scala and perl are functional languages, how do we differentiate them from languages like Haskell, OCaml, and Lisp, where the fundamental way of tackling problems is different?  I'd like to use the term "functional programming language" for the latter, and I'm more than happy to stick to "postfunctional programming language" or "multi-paradigm programming language" for the former.  But that means we stop calling Scala a functional programming language, as most of the commenters here on the post already have.  Deal?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37392">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Yeah, that's the general issue with these multiparadigm languages like Scala and perl.  If OCaml narrowly avoided that fate (and I think it has), it was by completely subjugating the OO aspect to the functional aspect, and not really using the OO aspect much.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37393">March 8, 2010</a>, joe poki wrote: If you think  saying somebody does not know squat about a subject while that person is supposed to be some sort of an expert on the topic is not condescending, then I do not know what is. 

By the way, it seems I was not alone, see Odersky's comment above.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37394">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: The immutability is a good point, and it's an area where Scala certainly pulls ahead.

Actually, the Ruby (and, to a lesser extent, C#) people regularly say that Java isn't really OO, because a lot of things in Java weren't either objects or messages.  I think Ruby inherited that criticism from the old SmallTalk people.  And I'll happily argue that OCaml isn't object oriented: while it <em>has</em> objects, it's certainly not oriented towards them.

What harms functional programming languages is when Java people learn Scala and then think they know functional programming languages.  Or, worse, when they decide they don't like Scala and then conclude they don't like functional programming.  This happens <em>a lot</em> because Scala was lauded as a functional programming language on the JVM which was comfortable for Java people.  It's the murkiness in the water that's the issue.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37395">March 8, 2010</a>, <a href='http://www.codecommit.com/blog' rel='external nofollow' class='url'>Daniel Spiewak</a> wrote: In Perl, functions and lambdas are fundamentally different.  If nothing else, this can be seen by the different invocation syntax.  You can convert between functions and lambdas (just like in Ruby and Groovy), but they are very different constructs as far as the language is concerned.

To me, one of the essentials of a functional language is that functions are merely lambdas which have been assigned to a named value.  OCaml and Haskell encourage this notion with their syntax for function declaration (in fact, Haskell's function decl syntax is <i>exactly</i> the same as its value decl syntax).  Perl doesn't even come close to meeting this qualification.  Scala does <i>substantially</i> better, though I'll admit that it does have its gotchas (methods are sometimes tricky).</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37396">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: While that's a bit hardcore of a comparison (and somewhat damning on people's ability to learn), I definitely agree with your point.  And Scala's great in this regard—as I said a number of times, I think Scala is where Java should be if Java's growth hadn't been stunted.  If you look at how C# has evolved, Scala's basically right in line with that kind of development.  And so a Java developer learning Scala in order to push their way of thinking about types and functions is a great move.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37397">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: True — I'm oversimplifying the world into imperative and functional.  There are other paradigms out there (e.g. Factor's stack-based approach) which also can lead to point free programming.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37398">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Do they work before that?  (Or, rather, would they work before that if I dumped the prototypes?)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37399">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: True: there are conversions that need to be made between functions and lambdas in perl.  This suggests for Scala (as a multiparadigm language) having a somewhat stronger functional aspect than perl, but it still doesn't make it a functional programming language <i>a la</i> OCaml and Haskell.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37400">March 8, 2010</a>, <a href='http://aliciaweller.com/' rel='external nofollow' class='url'>Alicia</a> wrote: Wouldn't it be awesome if you really could make money writing b.s.? People won't even donate a dollar towards valuable open source projects...the suggestion that you could make money for being good at b.s. is hilarious.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37401">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Amen.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37402">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: True enough.  I'm just trying to wrap my head around how Odersky can really grok functional programming and then assert that it's simply bolt-on features of a language.  The difference between Haskell and Java is not simply one of syntactic sugar.

Claiming he's mistaken about how FP works is actually a generous take—claiming he's clinging to the FP title for Scala for some ulterior reason when he should know better is much less generous.  I was trying to give him the benefit of the doubt.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37403">March 8, 2010</a>, <a href='http://james-iry.blogspot.com' rel='external nofollow' class='url'>James Iry</a> wrote: Robert Fischer Finally Admits That Scala Is Functional (http://james-iry.blogspot.com/2010/03/robert-fischer-finally-admits-that.html)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37404">March 8, 2010</a>, Martin Odersky wrote: Robert, please, read my post again:

http://www.scala-lang.org/node/4960

Nowhere did I define functional programming exclusively by a list of features. Instead I had as my central definition:

"A functional language makes programming centered around functions easy and natural."

A good test of this would be: is it common to write functional programs in the language in question? It's usually far easier to tell whether a program is functional than whether a programming language is functional.

By that standard Scala is clearly functional; many of the classes and modules written in it are purely functional and every cool idea from Haskell seems to be implemented sooner or later in Scala (not that we don't invent some cool ideas of our own as well).

I don't know Perl well enough to be able to tell whether there are many functional programs written in it, and whether the expression of such programs is easy and natural. 

Thanks anyway for giving me the benefit of the doubt that it's just misguidedness and not evilness that makes me insist on my ways.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37405">March 8, 2010</a>, bse wrote: Well, at least you admit you're writing about "religious issues", where arguments are replaced by belief. So by definition I can't argue with your expression of belief. However I don't have to agree with you.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37407">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: How do you account for this quote?

<blockquote>The first thing we cared about was to have as clean an integration of functional and object-oriented programming as possible. We wanted to have first-class functions in there, function literals, closures. We also wanted to have the other attributes of functional programming, such as types, generics, pattern matching. And we wanted to integrate the functional and object-oriented parts in a cleaner way than what we were able to achieve before with the Pizza language. That was something we deeply cared about from the start.

Later on, we discovered that this was actually very easy, because functional languages have a fixed set of features. They had been well researched and well proven, so the question was only how to best integrate that in object-oriented programming.</blockquote>

<a href="http://www.artima.com/scalazine/articles/goals_of_scala.html" rel="nofollow">The Goals of Scala's Design</a></li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37408">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Ugh.  I need to turn down the maximum comment nesting.  It's getting out of control, and the box is getting REALLY skinny.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37409">March 8, 2010</a>, Martin Odersky wrote: Classical fallacy: I said: functional languages have a well-identified, fixed set of features. So being a functional language implies having that fixed set of features (or rather, some part of it because I was talking about the union of all functional languages). You think I said: having that fixed set of features implies being a functional language. But I never said that.

Besides, that quote is not from the article I referred to. When I said "nowhere" I meant nowhere in that article, and I think that was clear from the context.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37410">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Okay, sure I'm taking your quotes from both your post on post-functional languages and another one on the design decisions behind Scala.  Sorry if I overgeneralized your "nowhere".

I read that quote as saying, "I went out to implement a functional language.  This was easy, because it turns out implementing a functional language means implementing a fixed set of features."  If that's not what you meant, what did you mean?

I'm uncomfortable with your broad definition because it leads to confusion.  Scala's extreme flexibility is exactly why I'm so resistant to labeling it a functional programming language — people learn the subset of Scala closest to Java and then think they know functional programming.  I'm really, really tired of explaining to people that functional programming is more than list comprehensions.

BTW, I want to say it straight to you, since I think things can get lost and there are some misconceptions floating around.  I really do appreciate all you've done on the JVM languages—especially proving to folks who only know Java that there's more to static typing than Java's conception of it.  And for all my pedantic resistance to calling Scala a functional language, it is one of my go-to languages for heavy lifting on the JVM.  (My own experiments in programming language development have Scala cores.)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37412">March 8, 2010</a>, Martin Odersky wrote: Adding functional language constructs was relatively easy, because they are well understood. Making Scala an organic whole was hard. We can disagree whether this succeeded or not. 

The other question is, should a functional language force you to program in a functional style? Scala clearly does not, that's why I prefer to call it postfunctional. I understand your uneasiness that some people might take this as an excuse never to get into real FP at all.
Where we might differ is that I believe that in the long run Scala programmers will recognize the benefits of the functional programming style even if it is not forced down on them.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37414">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: I'd say that if a language doesn't force you to program in a functional style (or at least <em>strongly</em> encourage you that way), I'd consider it suspect as being a functional programming language at all.  But I'm running on the stricter definition, as we've established.

I hope that your sense of the future is true, and that the functional programming style becomes more widely adopted by way of Scala.  And maybe being on the inside of Scala adoption, you're seeing that.  Sitting here on the outside, though, I've seen the contrary, which is why I'm such a stick in the mud.  Well, that and I'm preternaturally disposed towards being a stick in the mud.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37415">March 8, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/bhurt-aw/' rel='external nofollow' class='url'>Brian Hurt</a> wrote: Let me turn that question around: should object oriented languages impose an object oriented approach?

There is a value to learning, and really using, a paradigm.  Is that limit you just hit a limit of the paradigm, or just a limit of your understanding of the paradigm?  Until you expand your understanding, you don't really know- and the siren call of multi-paradigm languages is that they allow you to not expand your understanding by ditching the new paradigm early and often.

There is another comparison (one you'll like even less) to another multi-paradigm language- C++.  The reason C++ "won" was because it was multi-paradigm (procedural and OO), allowing people who didn't really understand OO to program in it.  The reason C++ "lost" was because it was a multi-paradigm language, forcing people to deal with the old paradigm whether it was valuable to or not.  The history of popular programming languages 1992-2007 was basically one of going ever less multi-paradigm and ever more pure OO.

In other words, is Scala "post-functional" in the same sense that C++ is "post-Object-Oriented"?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37416">March 8, 2010</a>, <a href='http://gabrielsw.blogspot.com' rel='external nofollow' class='url'>Gabriel C.</a> wrote: If we're talking about how to LEARN functional programming, I totally agree that Scala is not the best choice (neither OCaml... the O part is there, lurking in the back...). I would recommend a pure functional lazily evaluated language (i.e. Haskell). 
My experience was the opposite of Robert's fears: I started learning FP with Scala (limiting myself to the functional subset of it) and then moved to learn Haskell (and I try to pick up as much as OCaml as I can on the way), but I guess I'm just weird: I've learned OO in C++ :)
But somewhat I agree in the comparison: C++ is to C as Scala is to Java</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37418">March 9, 2010</a>, joe poki wrote: Robert,  I was actually talking about this kind of strong encouragement in my previous post when I said that scala was nudging you towards FP.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37419">March 9, 2010</a>, Martin Odersky wrote: If Scala had taken all of Java and then added FP to it, a comparison with C++ might have merit. But as it stands Scala
has thrown out or generalized a lot of Java's more crufty features. Where C++ is clearly much more complicated than C, the situation between Scala and Java is more balanced. Scala's syntax is a probably a bit simpler than Java's but its types are richer and more powerful. So you can say that Scala shares C++'s motivation -- take a well established programming style and let it branch out into a new paradigm. But it shares neither its approach (to be an almost strict superset of a base language) nor its overwhelming complexity.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37420">March 9, 2010</a>, <a href='http://blog.juma.me.uk' rel='external nofollow' class='url'>Ismael Juma</a> wrote: Hey Robert,

I found the following in your LinkedIn page:

"Robert Fischer is a multi-language open source developer currently specializing in Groovy in Grails. In the past, his specialties have been in Perl, Java, Ruby, and OCaml. In the future, his specialty will probably be F# or (preferably) a functional JVM language like Scala or Clojure."

What, did you just call Scala a functional language?!

Ismael</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37421">March 9, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Busted!

Really, that's exactly what I've been discussing with Martin O.—if you know functional programming already, you can do functional programming in Scala.  And if you're on the JVM, like static typing, and want to do functional programming, you really don't have a better option.

BTW, in Scala, I'm still struggling a bit to do functional programming in a way that's particularly friendly to Scala's approach — algebraic data types and function manipulation <i>a la</i> curry/flip are standard stunts for me, and I feel like I'm swimming upstream when I try those in Scala.  I really should look more into some open source projects—anyone have one in Scala that's particularly functional?

(In any case, I should update that since I'm now an .Net/F# developer.)</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37422">March 9, 2010</a>, joe poki wrote: that is hilarious!</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37423">March 9, 2010</a>, peter pnin wrote: Robert, are you under the employ of Flying Frog Consultancy, perchance?

There is a certain Harropity, if you will, to your blog post.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37425">March 9, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/candide/' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Ouch.  Of all the nasty things people have said about me because of this post (up to and including calling me a "douchebag"), that's the first one to hit home.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37427">March 10, 2010</a>, joe poki wrote: Robert, I am sorry people called you names but I am not sure what you expected. You published a deliberately controversial post (or may I say a very trollish one?) where you wrote off  a whole language using standard (and frankly boooring) points like “it’s too complicated, its syntax is weird, it’s too magical, people write in entirely distinct subsets of the language”  for one particular issue you have with it  and on top of this, you called the given language's creator a numerous times pretty much clueless when it comes to FP.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37429">March 10, 2010</a>, <a href='http://pchiusano.blogspot.com' rel='external nofollow' class='url'>Paul Chiusano</a> wrote: Functional programming just means programming with pure functions (no observable side effects). The alternative is imperative programming - programming with observable side effects. OO is orthogonal - you can program using pure functions operating over objects if you like, or your functions operating over objects can have side effects. Of course, most real programs have some mixture of functional and imperative styles.

There are some language features that make programming in a purely functional style more convenient, sure, but basically, with some discipline you can program in this style in any language, Scala (and Perl!) included. My personal opinion is that Scala makes FP pretty convenient - your argument seems to be merely that it's not as convenient as it could be in some instances and therefore doesn't get your official "functional language" stamp. I guess that is fine, although the distinctions you are making seem pretty arbitrary to me.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37430">March 11, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/bhurt-aw/' rel='external nofollow' class='url'>Brian Hurt</a> wrote: I don't see what the big deal with Object Oriented languages is.  I mean, you can do Object Oriented programming in languages like C and Pascal- yeah, it's not quite as <em>convenient</em> as doing it in a language like Java or Ruby, but there's no real reason to switch, is there?</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37431">March 11, 2010</a>, <a href='http://gabrielsw.blogspot.com' rel='external nofollow' class='url'>Gabriel C.</a> wrote: But maybe the only true "popular" OO language is SmallTalk, it could be argued that Java is not really OO, having primitive types and static methods, and many don't really in a fully OO way...</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37432">March 11, 2010</a>, <a href='http://gabrielsw.blogspot.com' rel='external nofollow' class='url'>Gabriel C.</a> wrote: Perhaps the difference is that C and Pascal don't have "first class" objects and Java and Ruby have.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37433">March 11, 2010</a>, Paul Kaletta wrote: Well, I've never used Perl 4, but afaik it didn't have a reference variable type and it didn't have lexical scoping, so your examples would not have worked in the current form.

Glancing at the Perl 4 manpages it seems that Perl 4 could already pass around code blocks, however it seems to me that you would have had to capture variables manually, which means that closures would have been difficult to do.</li><li><a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#comment-37434">March 11, 2010</a>, <a href='http://enfranchisedmind.com/blog/posts/author/bhurt-aw/' rel='external nofollow' class='url'>Brian Hurt</a> wrote: They have structures, and function pointers, and you can put the function pointers in the structures giving you virtual methods.  Inheritance is a little tricky, but no one is using that anyways these days, so no problem.  Yeah, it's a little bit klunky, but all the important stuff is there, so why do we need to leave C and Pascal again?

If you haven't figured it out, I'm making one of my little points by adopting this position.</li></ul><hr />
This post was by <a href="http://enfranchisedmind.com/blog/posts/author/candide/">Robert Fischer</a>, written on March 6, 2010.<br />
Comment on this post: <a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/#respond">http://enfranchisedmind.com/blog/posts/post-functional-scala/#respond</a><br />
Public Permalink: <a href="http://enfranchisedmind.com/blog/posts/post-functional-scala/">http://enfranchisedmind.com/blog/posts/post-functional-scala/</a>
<hr /><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png" /></a><br />This article was a post on <a href="http://enfranchisedmind.com/blog">the EnfranchisedMind blog</a>.  <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">EnfranchisedMind Blog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://enfranchisedmind.com/blog/" property="cc:attributionName" rel="cc:attributionURL">Robert Fischer, Brian Hurt, and Other Authors</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.<p style="display:none;">(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (66.30.198.4) )</p></small>]]></content:encoded>
			<wfw:commentRss>http://enfranchisedmind.com/blog/posts/post-functional-scala/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Going to be at Mid South Software Symposium (Memphis, TN)</title>
		<link>http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/</link>
		<comments>http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 01:01:05 +0000</pubDate>
		<dc:creator>Robert Fischer</dc:creator>
				<category><![CDATA[No Fluff/G2X/AgileRx]]></category>

		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=2271</guid>
		<description><![CDATA[I've been scheduled at the Mid South Software Symposium in Memphis, TN.  It's April 23rd to the 25th.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nofluffjuststuff.com"><img src="http://www.nofluffjuststuff.com/images/nfjs_logo200.gif" alt="No Fluff Just Stuff"/> </a></p>
<p>I&#8217;ve been scheduled at the Mid South Software Symposium in Memphis, TN.  Never been to Memphis before, so this should be fun.  You can see my schedule <a href="http://www.nofluffjuststuff.com/conference/memphis/2010/04/speakers/robert_fischer">over on the NFJS site</a>: as of this writing, it&#8217;s two concurrency talks, build tools (Gradle/Hudson/etc.), and reusability (OSGi).</p>
<p>If you&#8217;re from the Memphis area and coming, it&#8217;ll be great to see you there.  If you&#8217;re not from the Memphis area and you&#8217;d like to see me in your area, <a href="http://www.nofluffjuststuff.com/home/feedback">let NFJS know</a> or <a href="http://smokejumperit.com/contact/">contact me via the form on SmokejumperIT.com</a>.</p>
<hr />
This post was by <a href="http://enfranchisedmind.com/blog/posts/author/candide/">Robert Fischer</a>, written on March 1, 2010.<br />
Comment on this post: <a href="http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/#respond">http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/#respond</a><br />
Public Permalink: <a href="http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/">http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/</a>
<hr /><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png" /></a><br />This article was a post on <a href="http://enfranchisedmind.com/blog">the EnfranchisedMind blog</a>.  <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">EnfranchisedMind Blog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://enfranchisedmind.com/blog/" property="cc:attributionName" rel="cc:attributionURL">Robert Fischer, Brian Hurt, and Other Authors</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.<p style="display:none;">(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (66.30.198.4) )</p></small>]]></content:encoded>
			<wfw:commentRss>http://enfranchisedmind.com/blog/posts/going-to-be-at-mid-south-software-symposium-memphis-tn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DynamicDomainProperties and the AGPL</title>
		<link>http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/</link>
		<comments>http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 00:24:33 +0000</pubDate>
		<dc:creator>Robert Fischer</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[AGPL]]></category>
		<category><![CDATA[DynamicDomainProperties]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=2309</guid>
		<description><![CDATA[Why I released the DynamicDomainProperties plugin under the AGPL, and how your business can cope.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html"><img src="http://www.gnu.org/graphics/agplv3-155x51.png" /></a></p>
<p><a href='http://www.pledgie.com/campaigns/9065'><img alt='Click here to lend your support to: Un-AGPL DynamicDomainProperties 1.0 and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/9065.png?skin_name=chrome' border='0' /></a></p>
<p>I just released the DynamicDomainProperties plugin for Grails, which allows domain classes to have dynamic properties.  It&#8217;s pretty nifty, if I do say so myself.</p>
<p>Based on <a href="http://enfranchisedmind.com/blog/posts/open-letter-to-burt-beckwith/">my frustration with the Grails plugin culture</a> because of <a href="http://enfranchisedmind.com/blog/posts/open-source-users/">differing cultural assumptions about open source works</a>, and based on <a href="http://enfranchisedmind.com/blog/posts/self-destructive-oss/">my lack of appreciation for the promises of indirect compensation offered to me as an open source developer</a>, I&#8217;ve decided to release it under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">GNU-Affero GPL 3.0</a>, which is like the GPL but (among other things) requires the source to be available to the users of a web app that use this plugin.</p>
<p>I&#8217;m open to the idea of releasing it under the more &#8220;biz-friendly&#8221; BSD, but then <a href="http://enfranchisedmind.com/blog/posts/a-defense-of-the-gpl/">I&#8217;m going to want a different form of compensation</a>.  So I&#8217;m putting up a bounty via Pledgie: if I was building this plugin as a consultant, it would have cost a client about $2500. So, if the commercial community contributes $2500, I&#8217;ll do a BSD release.  Anyone who donates $250 or more gets a single-domain usage license right away.</p>
<p>For more information on the plugin, see <a href="http://grails.org/plugin/dynamic-domain-properties">the plugin page on grails.org</a>.  (I&#8217;ve had enough difficulty with GitHub&#8217;s wiki freaking out on me and would rather avoid that.)</p>
<hr /><h2>Comments</h2><ul><li><a href="http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#comment-37286">February 22, 2010</a>, <a href='http://www.anyware.co.uk' rel='external nofollow' class='url'>Marc Palmer</a> wrote: I'm interested to see how this pans out Robert - good luck!</li><li><a href="http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#comment-37328">March 4, 2010</a>, <a href='http://gr8fanboy.wordpress.com/' rel='external nofollow' class='url'>Jeremy Flowers</a> wrote: Way to go. This looks like the way forward to me. In the Microsoft' arena GUI component vendors started to sell there wares this way too, like Infragistics. I always thought plug-ins would have to go the same way to get support for your plug-ins. You have to put food on the table somehow..</li><li><a href="http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#comment-37338">March 5, 2010</a>, <a href='http://metasieve.wordpress.com/2010/03/05/does-grails-have-a-problem/' rel='external nofollow' class='url'>Does Grails have a problem? &laquo; The MetaSieve Blog</a> wrote: [...] I have time to, I can completely comprehend Robert&#8217;s point of view and his desire to get a different kind of compensation  for his open source work. In fact, there should be plenty of space for both approaches (and [...]</li></ul><hr />
This post was by <a href="http://enfranchisedmind.com/blog/posts/author/candide/">Robert Fischer</a>, written on February 20, 2010.<br />
Comment on this post: <a href="http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#respond">http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/#respond</a><br />
Public Permalink: <a href="http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/">http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/</a>
<hr /><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png" /></a><br />This article was a post on <a href="http://enfranchisedmind.com/blog">the EnfranchisedMind blog</a>.  <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">EnfranchisedMind Blog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://enfranchisedmind.com/blog/" property="cc:attributionName" rel="cc:attributionURL">Robert Fischer, Brian Hurt, and Other Authors</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.<p style="display:none;">(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (66.30.198.4) )</p></small>]]></content:encoded>
			<wfw:commentRss>http://enfranchisedmind.com/blog/posts/dynamicdomainproperties-grails-plugin-agpl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I Don&#8217;t Get It</title>
		<link>http://enfranchisedmind.com/blog/posts/i-dont-get-it/</link>
		<comments>http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 20:29:31 +0000</pubDate>
		<dc:creator>Robert Fischer</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software Business]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=2276</guid>
		<description><![CDATA[Java's open source culture confuses me.]]></description>
			<content:encoded><![CDATA[<p>When encountering a bug in an open source project, most Java people seem unwilling to either fix it themselves or pay the maintainer to fix it—they&#8217;d rather abandon the project or kludge their software painfully and repetitively.  WTF?</p>
<hr /><h2>Comments</h2><ul><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37216">February 5, 2010</a>, <a href='http://hamletdarcy.blogspot.com' rel='external nofollow' class='url'>Hamlet D'Arcy</a> wrote: In the past my problem has been that my organization would not let me rely on a personal or nightly build of a project. So when you need a workaround by the end of the week, waiting 2 months for the next release candidate of an OS project is not an option. 

... now go release JConch 1.2.</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37217">February 5, 2010</a>, <a href='http://www.naildrivin5.com/blog' rel='external nofollow' class='url'>Dave</a> wrote: I've encountered this a few times.  Sometimes, I'm trying to get things done, so I hack around the problem and then there's not always time to go back and learn a new codebase to submit a patch.  

Further, having submitted a few patches to a maven plugin (a piece of software I cannot stand, but submitted anyway), it's been months since I uploaded a freakin' zip file to their JIRA and no movement.

I also think compared to, say, Ruby, a lot of Java packages are very large and complex.  If I find a bug in Spring or Hibernate, my chances of even navigating the codebase to find out where the problem is are nil.  And Spring is actually pretty clean code; I mucked through JSCh and the maven release plugin and was HORRIFIED at how awful the code was.

And then there's the myriad build systems and spotty tests; One of the Castor devs asked me write a test or he wouldn't accept my patch; my patch was to make his code actually compile.  And their tests on trunk (and release tag) didn't pass.

Meanwhile, on github, I've submitted patches to things that I wrote and tested in less time than it took to find the svn link on Apache's site.  I've also incorporated others changes to my code (that they didn't even submit).  Granted these things are not as complex as Spring, but, well, maybe that's a good thing?</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37218">February 5, 2010</a>, <a href='http://www.naildrivin5.com/blog' rel='external nofollow' class='url'>Dave</a> wrote: @Hamlet D'Arcy  in your case, I have imported the released version I'm using into our company's svn repo and made changes I needed against that, then deployed THAT to our maven repo.  It was painful, but worked.</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37219">February 5, 2010</a>, <a href='http://twitter.com/RobertFischer' rel='external nofollow' class='url'>Robert Fischer</a> wrote: Argh.  I've totally forgotten about JConch 1.2.  Just released it.  It's now a Gradle-based build (I wanted to OSGi-ify the project and have a Maven repo).</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37220">February 5, 2010</a>, <a href='http://spockframework.org' rel='external nofollow' class='url'>Peter Niederwieser</a> wrote: From my experience, most developers aren't even willing to take the time to report a bug they encounter...</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37222">February 6, 2010</a>, <a href='http://plasmasturm.org/' rel='external nofollow' class='url'>Aristotle Pagaltzis</a> wrote: I agree with Peter – I actually <a href="http://twitter.com/apag/status/7101875141" rel="nofollow">tweeted the same observation</a> just a few weeks ago. I got <a href="http://twitter.com/jrockway/status/7101912403" rel="nofollow">one response to that</a> that <a href="http://twitter.com/apag/status/7360563175" rel="nofollow">didn’t satisfy me either</a>.

It’s not limited to Java either.</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37233">February 6, 2010</a>, <a href='http://blog.james-carr.org' rel='external nofollow' class='url'>James Carr</a> wrote: Yeah... this has often surprised me as well. I've witnessed a team try to use some open source solution and give up because of a minor bug and go to a much more difficult to use proprietary solution (which amusingly had more critical bugs). 

I was also surprised when at my current client site they actually asked me spend a week working on fixing a bug in an open source project  and submit a patch... that's definitely the best attitude to have. :)</li><li><a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#comment-37413">March 8, 2010</a>, <a href='http://mcherm.com/' rel='external nofollow' class='url'>Michael Chermside</a> wrote: For projects in ALL languages, the difficulty in getting a patch accepted is a genuine issue (and is difficult to solve). There is a sweet-spot of small, recent projects that accept patches easily. Older projects are often neglected (or abandoned) by their original authors, which makes accepting patches difficult. Larger projects necessarily set standards (like requiring unit tests or moderately complicated review processes, or certain coding standards) which not every patch will meet. The problem is not easily solved because these are inherent problems rather than just projects being obstinate.

Meanwhile, Java programmers are probably worse because (1) many well-known open-source Java projects are large and corporately sponsored which makes it difficult to get them to accept patches, and (2) many Java programmers work in corporate environments where it is difficult to get "permission" to contribute to an open source project. Simply not being in the habit of doing so makes the practice less likely than with other languages.</li></ul><hr />
This post was by <a href="http://enfranchisedmind.com/blog/posts/author/candide/">Robert Fischer</a>, written on February 5, 2010.<br />
Comment on this post: <a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/#respond">http://enfranchisedmind.com/blog/posts/i-dont-get-it/#respond</a><br />
Public Permalink: <a href="http://enfranchisedmind.com/blog/posts/i-dont-get-it/">http://enfranchisedmind.com/blog/posts/i-dont-get-it/</a>
<hr /><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png" /></a><br />This article was a post on <a href="http://enfranchisedmind.com/blog">the EnfranchisedMind blog</a>.  <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">EnfranchisedMind Blog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://enfranchisedmind.com/blog/" property="cc:attributionName" rel="cc:attributionURL">Robert Fischer, Brian Hurt, and Other Authors</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.<p style="display:none;">(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (66.30.198.4) )</p></small>]]></content:encoded>
			<wfw:commentRss>http://enfranchisedmind.com/blog/posts/i-dont-get-it/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.467 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-13 03:14:32 -->
<!-- Compression = gzip -->