<?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 for //extrabright</title>
	<atom:link href="http://extrabright.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://extrabright.com/blog</link>
	<description>//pat&#039;s blog</description>
	<lastBuildDate>Sat, 10 Jul 2010 20:55:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Scala Question Regarding readLine by pajai</title>
		<link>http://extrabright.com/blog/2010/07/10/scala-question-regarding-readline/comment-page-1/#comment-98361</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Sat, 10 Jul 2010 20:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=262#comment-98361</guid>
		<description>Indeed, there is also this possibility. Interesting.</description>
		<content:encoded><![CDATA[<p>Indeed, there is also this possibility. Interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scala Question Regarding readLine by Slava</title>
		<link>http://extrabright.com/blog/2010/07/10/scala-question-regarding-readline/comment-page-1/#comment-98359</link>
		<dc:creator>Slava</dc:creator>
		<pubDate>Sat, 10 Jul 2010 19:52:52 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=262#comment-98359</guid>
		<description>Sorry for my English, i&#039;m just to unclear...

the &quot;line&quot; is a value and cannot be executed, it is assigned only once from the result of the &quot;Console.readLine&quot; method execution. It is used than three times in your closure. But if you define it as a method, it will be executed three times:

(1 to 3) foreach {
  def line = Console.readLine
  i =&gt; println(line)
}</description>
		<content:encoded><![CDATA[<p>Sorry for my English, i&#8217;m just to unclear&#8230;</p>
<p>the &#8220;line&#8221; is a value and cannot be executed, it is assigned only once from the result of the &#8220;Console.readLine&#8221; method execution. It is used than three times in your closure. But if you define it as a method, it will be executed three times:</p>
<p>(1 to 3) foreach {<br />
  def line = Console.readLine<br />
  i =&gt; println(line)<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scala Question Regarding readLine by pajai</title>
		<link>http://extrabright.com/blog/2010/07/10/scala-question-regarding-readline/comment-page-1/#comment-98358</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Sat, 10 Jul 2010 19:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=262#comment-98358</guid>
		<description>Just noticed that the code is behaving as expected if the val definition is located in the second part of the closure:

(1 to 3) foreach {
	i =&gt;
	val line = Console.readLine
	println(line)
}</description>
		<content:encoded><![CDATA[<p>Just noticed that the code is behaving as expected if the val definition is located in the second part of the closure:</p>
<p>(1 to 3) foreach {<br />
	i =><br />
	val line = Console.readLine<br />
	println(line)<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scala Question Regarding readLine by pajai</title>
		<link>http://extrabright.com/blog/2010/07/10/scala-question-regarding-readline/comment-page-1/#comment-98355</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Sat, 10 Jul 2010 19:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=262#comment-98355</guid>
		<description>Oh, ok. I get it. So the val definition inside the closure is just executed once. I would have expected that it is executed each time the closure is executed. Thanks for the answer!</description>
		<content:encoded><![CDATA[<p>Oh, ok. I get it. So the val definition inside the closure is just executed once. I would have expected that it is executed each time the closure is executed. Thanks for the answer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scala Question Regarding readLine by Slava</title>
		<link>http://extrabright.com/blog/2010/07/10/scala-question-regarding-readline/comment-page-1/#comment-98354</link>
		<dc:creator>Slava</dc:creator>
		<pubDate>Sat, 10 Jul 2010 19:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=262#comment-98354</guid>
		<description>Hi!
I&#039;m definitely not a Scala expert, but...

The problem with the first snippet is that the function you define is 

i =&gt; println(line)

This is a closure which will be executed three times as expected. But it is closed to the line value which is read one time from the console.

In the second snippet the function is 

i =&gt; println(Console.readLine)

which is just executed three times.</description>
		<content:encoded><![CDATA[<p>Hi!<br />
I&#8217;m definitely not a Scala expert, but&#8230;</p>
<p>The problem with the first snippet is that the function you define is </p>
<p>i =&gt; println(line)</p>
<p>This is a closure which will be executed three times as expected. But it is closed to the line value which is read one time from the console.</p>
<p>In the second snippet the function is </p>
<p>i =&gt; println(Console.readLine)</p>
<p>which is just executed three times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Quiz of the Day by pajai</title>
		<link>http://extrabright.com/blog/2010/05/22/java-quiz-of-the-day-2/comment-page-1/#comment-98001</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Thu, 01 Jul 2010 10:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=250#comment-98001</guid>
		<description>Yes it is beautifully solved in Scala. The ability to define the co- and contravariance with respect to Generic type directly at the definition point is clever.</description>
		<content:encoded><![CDATA[<p>Yes it is beautifully solved in Scala. The ability to define the co- and contravariance with respect to Generic type directly at the definition point is clever.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Quiz of the Day by Heiko</title>
		<link>http://extrabright.com/blog/2010/05/22/java-quiz-of-the-day-2/comment-page-1/#comment-97999</link>
		<dc:creator>Heiko</dc:creator>
		<pubDate>Thu, 01 Jul 2010 09:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=250#comment-97999</guid>
		<description>Check out Scala&#039;s co- and contravariance features =&gt; Very handy to get things like above working!</description>
		<content:encoded><![CDATA[<p>Check out Scala&#8217;s co- and contravariance features =&gt; Very handy to get things like above working!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on GPGMail Compatible with Snow Leopard by pajai</title>
		<link>http://extrabright.com/blog/2010/03/28/gpgmail-compatible-with-snow-leopard/comment-page-1/#comment-94707</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Sun, 11 Apr 2010 18:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=217#comment-94707</guid>
		<description>OS X 10.6.3 breaks the previously posted version of GPGMail. Here is a link to a fix for 10.6.3:

http://github.com/downloads/lukele/GPGMail-SL/GPGMail.mailbundle-1.2.3-v61-10.6.3-fix.zip</description>
		<content:encoded><![CDATA[<p>OS X 10.6.3 breaks the previously posted version of GPGMail. Here is a link to a fix for 10.6.3:</p>
<p><a href="http://github.com/downloads/lukele/GPGMail-SL/GPGMail.mailbundle-1.2.3-v61-10.6.3-fix.zip" rel="nofollow">http://github.com/downloads/lukele/GPGMail-SL/GPGMail.mailbundle-1.2.3-v61-10.6.3-fix.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Geekiest Hello World by pajai</title>
		<link>http://extrabright.com/blog/2009/06/11/the-geekiest-hello-world/comment-page-1/#comment-90434</link>
		<dc:creator>pajai</dc:creator>
		<pubDate>Fri, 12 Jun 2009 20:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=180#comment-90434</guid>
		<description>Hi Ben!

hey, that&#039;s cool your version in Python.

Cheers!</description>
		<content:encoded><![CDATA[<p>Hi Ben!</p>
<p>hey, that&#8217;s cool your version in Python.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Geekiest Hello World by BenP</title>
		<link>http://extrabright.com/blog/2009/06/11/the-geekiest-hello-world/comment-page-1/#comment-90399</link>
		<dc:creator>BenP</dc:creator>
		<pubDate>Thu, 11 Jun 2009 23:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://extrabright.com/blog/?p=180#comment-90399</guid>
		<description>gah not formatted properly, but you get the gist... ;)</description>
		<content:encoded><![CDATA[<p>gah not formatted properly, but you get the gist&#8230; <img src='http://extrabright.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
