<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: Can lambda expressions be used to define recursive functions?</title>
	<atom:link href="https://www.lambdafaq.org/can-lambda-expressions-be-used-to-define-recursive-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lambdafaq.org/can-lambda-expressions-be-used-to-define-recursive-functions/</link>
	<description>Your questions answered: all about Lambdas and friends</description>
	<lastBuildDate>Wed, 23 Sep 2020 15:06:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>By: naftalin</title>
		<link>https://www.lambdafaq.org/can-lambda-expressions-be-used-to-define-recursive-functions/#comment-6543</link>
		<dc:creator><![CDATA[naftalin]]></dc:creator>
		<pubDate>Thu, 17 Jan 2013 16:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lambdafaq.org/?p=74#comment-6543</guid>
		<description><![CDATA[According to &lt;a href=&quot;http://docs.oracle.com/javase/specs/jls/se7/html/jls-16.html&quot; rel=&quot;nofollow&quot;&gt;Chapter 16 of the Java Language Specification&lt;/a&gt;
&lt;blockquote&gt;Each local variable ... must have a definitely assigned value when any access of its value occurs.

An access to its value consists of the simple name of the variable ... occurring anywhere in an expression except as the left-hand operand of the simple assignment operator =&lt;/blockquote&gt;
So the JLS supports the interpretation of &quot;use&quot; that is implied in this post. Whether those are the best semantics for a functional language is a different question.  But then, Java in its initial design had no pretentions to being a functional language.

[Edit, 28-July-2013] This question continues to gives rise to a lot of confusion, both because Paulo&#039;s comment is very reasonable and because a long-superseded &lt;a href=&quot;http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html&quot; rel=&quot;nofollow&quot;&gt;version of SoL&lt;/a&gt; did state (in §6, with examples) that the assignment-before-use rule would be refined to allow lambdas to use local variables for self-reference. That decision was reversed and the facility &lt;a href=&quot;http://mail.openjdk.java.net/pipermail/lambda-dev/2012-October/006216.html&quot; rel=&quot;nofollow&quot;&gt;removed from the JSR spec&lt;/a&gt; in October 2012, because it was felt that there was too much work involved to be worth supporting a corner-case with a simple workaround.  ]]></description>
		<content:encoded><![CDATA[<p>According to <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-16.html" rel="nofollow">Chapter 16 of the Java Language Specification</a></p>
<blockquote><p>Each local variable &#8230; must have a definitely assigned value when any access of its value occurs.</p>
<p>An access to its value consists of the simple name of the variable &#8230; occurring anywhere in an expression except as the left-hand operand of the simple assignment operator =</p></blockquote>
<p>So the JLS supports the interpretation of &#8220;use&#8221; that is implied in this post. Whether those are the best semantics for a functional language is a different question.  But then, Java in its initial design had no pretentions to being a functional language.</p>
<p>[Edit, 28-July-2013] This question continues to gives rise to a lot of confusion, both because Paulo&#8217;s comment is very reasonable and because a long-superseded <a href="http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html" rel="nofollow">version of SoL</a> did state (in §6, with examples) that the assignment-before-use rule would be refined to allow lambdas to use local variables for self-reference. That decision was reversed and the facility <a href="http://mail.openjdk.java.net/pipermail/lambda-dev/2012-October/006216.html" rel="nofollow">removed from the JSR spec</a> in October 2012, because it was felt that there was too much work involved to be worth supporting a corner-case with a simple workaround.  </p>
]]></content:encoded>
	</item>
</channel>
</rss>
