<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Learning Scala: Compiler Surprises</title>
	<atom:link href="http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/feed/" rel="self" type="application/rss+xml" />
	<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/</link>
	<description>Thoughts on software development</description>
	<lastBuildDate>Tue, 29 Sep 2009 10:27:34 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scala: for a/vs while &#171; Villane</title>
		<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-16</link>
		<dc:creator>Scala: for a/vs while &#171; Villane</dc:creator>
		<pubDate>Wed, 06 Feb 2008 23:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-16</guid>
		<description>[...] comes from by examining what the library code and the compiler actually do here, as I did in a previous post. The imperative style while expression will be compiled into some pretty efficient byte-code, which [...]</description>
		<content:encoded><![CDATA[<p>[...] comes from by examining what the library code and the compiler actually do here, as I did in a previous post. The imperative style while expression will be compiled into some pretty efficient byte-code, which [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learning Scala: Performance Impact of Implicit Conversions &#171; Villane</title>
		<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-14</link>
		<dc:creator>Learning Scala: Performance Impact of Implicit Conversions &#171; Villane</dc:creator>
		<pubDate>Sat, 02 Feb 2008 16:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-14</guid>
		<description>[...] great tool for enhancing classes coming from libraries that you can&#8217;t just change yourself. I went into details on how it works a few weeks ago. With implicit conversions it can be made to appear that methods [...]</description>
		<content:encoded><![CDATA[<p>[...] great tool for enhancing classes coming from libraries that you can&#8217;t just change yourself. I went into details on how it works a few weeks ago. With implicit conversions it can be made to appear that methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Zeiger</title>
		<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-10</link>
		<dc:creator>Stefan Zeiger</dc:creator>
		<pubDate>Fri, 11 Jan 2008 23:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-10</guid>
		<description>I just checked the first edition of the JLS. It&#039;s always been the same but it turns out my earlier description was wrong, too. In fact, &#039;+&#039; operators are evaluated strictly from left to right with no look-ahead to detect string concatenation. But string concatenation occurs when *either* the left or right hand operand is a string. That&#039;s why the 1 + &quot; minute&quot; -&gt; &quot;1 minute&quot; example works. &quot;foo&quot; + 1 + 2 also gives the expected result &quot;foo12&quot; but 1 + 2 + &quot;foo&quot; gets evaluated as (1 + 2) + &quot;foo&quot; and gives the result &quot;3foo&quot;. The somehwat ugly workaround &quot;&quot; + 1 + 2 + &quot;foo&quot; enforces a string concatenation so you get &quot;12foo&quot;.

I don&#039;t think I have ever encountered such a situation (with 2 non-string objects at the beginning of a string concatentation) in all my years of Java programming.</description>
		<content:encoded><![CDATA[<p>I just checked the first edition of the JLS. It&#8217;s always been the same but it turns out my earlier description was wrong, too. In fact, &#8216;+&#8217; operators are evaluated strictly from left to right with no look-ahead to detect string concatenation. But string concatenation occurs when *either* the left or right hand operand is a string. That&#8217;s why the 1 + &#8221; minute&#8221; -&gt; &#8220;1 minute&#8221; example works. &#8220;foo&#8221; + 1 + 2 also gives the expected result &#8220;foo12&#8243; but 1 + 2 + &#8220;foo&#8221; gets evaluated as (1 + 2) + &#8220;foo&#8221; and gives the result &#8220;3foo&#8221;. The somehwat ugly workaround &#8220;&#8221; + 1 + 2 + &#8220;foo&#8221; enforces a string concatenation so you get &#8220;12foo&#8221;.</p>
<p>I don&#8217;t think I have ever encountered such a situation (with 2 non-string objects at the beginning of a string concatentation) in all my years of Java programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erkki Lindpere</title>
		<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-9</link>
		<dc:creator>Erkki Lindpere</dc:creator>
		<pubDate>Fri, 11 Jan 2008 21:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-9</guid>
		<description>Thanks for pointing that out. For some reason I have never noticed this feature about Java and remember seeing code like &quot;&quot; + 1 + ... . Has it always been like this?</description>
		<content:encoded><![CDATA[<p>Thanks for pointing that out. For some reason I have never noticed this feature about Java and remember seeing code like &#8220;&#8221; + 1 + &#8230; . Has it always been like this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szeiger</title>
		<link>http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-8</link>
		<dc:creator>szeiger</dc:creator>
		<pubDate>Fri, 11 Jan 2008 20:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://villane.wordpress.com/2008/01/11/learning-scala-compiler-surprises/#comment-8</guid>
		<description>Actually, the string concatenation is just as easy in Java:

String s = 1 + &quot; minute&quot;;

Chained &quot;+&quot; operations are always considered as a whole and if there is at least one operand of type String, a string concatenation is performed.</description>
		<content:encoded><![CDATA[<p>Actually, the string concatenation is just as easy in Java:</p>
<p>String s = 1 + &#8221; minute&#8221;;</p>
<p>Chained &#8220;+&#8221; operations are always considered as a whole and if there is at least one operand of type String, a string concatenation is performed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
