<?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: Ruby Chronicles #1: Blocks and Yield	</title>
	<atom:link href="https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Tue, 23 May 2006 06:45:13 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Steven		</title>
		<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/comment-page-1#comment-3510</link>

		<dc:creator><![CDATA[Steven]]></dc:creator>
		<pubDate>Tue, 23 May 2006 06:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1012#comment-3510</guid>

					<description><![CDATA[Blocks made me go &#039;huh?&#039; at first, too.  However, I know some Java programmers that use them quite often.  There is a difference between a block and a closure, though.  There are some great examples of their uses later on in the Agile book (2nd edition coming soon) and in the Recipes book.


]]></description>
			<content:encoded><![CDATA[<p>Blocks made me go &#8216;huh?&#8217; at first, too.  However, I know some Java programmers that use them quite often.  There is a difference between a block and a closure, though.  There are some great examples of their uses later on in the Agile book (2nd edition coming soon) and in the Recipes book.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JesterXL		</title>
		<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/comment-page-1#comment-3509</link>

		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Mon, 22 May 2006 21:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1012#comment-3509</guid>

					<description><![CDATA[Yep, &lt;a href=&quot;http://www.jessewarden.com/archives/2005/11/haxe_programmin.html&quot; rel=&quot;nofollow&quot;&gt;blogged haXe&lt;/a&gt;.]]></description>
			<content:encoded><![CDATA[<p>Yep, <a href="http://www.jessewarden.com/archives/2005/11/haxe_programmin.html" rel="nofollow">blogged haXe</a>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nicolas		</title>
		<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/comment-page-1#comment-3508</link>

		<dc:creator><![CDATA[Nicolas]]></dc:creator>
		<pubDate>Sun, 21 May 2006 14:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1012#comment-3508</guid>

					<description><![CDATA[RoR is pretty hot theses days. That&#039;s good since Ruby has a lot of advantages over others dynamicly typed programming languages (like PHP). However it&#039;s still dynamicly typed. Did you have a look at haXe &lt;a href=&quot;http://haxe.org/tutos/remoting/proxy&quot; rel=&quot;nofollow&quot;&gt;Remoting Proxys&lt;/a&gt; ? They are a good way to do typeful communications between the Flash Client and the Server.]]></description>
			<content:encoded><![CDATA[<p>RoR is pretty hot theses days. That&#8217;s good since Ruby has a lot of advantages over others dynamicly typed programming languages (like PHP). However it&#8217;s still dynamicly typed. Did you have a look at haXe <a href="http://haxe.org/tutos/remoting/proxy" rel="nofollow">Remoting Proxys</a> ? They are a good way to do typeful communications between the Flash Client and the Server.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Campbell		</title>
		<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/comment-page-1#comment-3507</link>

		<dc:creator><![CDATA[Campbell]]></dc:creator>
		<pubDate>Fri, 19 May 2006 04:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1012#comment-3507</guid>

					<description><![CDATA[Hmmm burning the midnight oil on ruby. Im loving it as a data source for flex2. But much like you I have found several things that make me go huh?]]></description>
			<content:encoded><![CDATA[<p>Hmmm burning the midnight oil on ruby. Im loving it as a data source for flex2. But much like you I have found several things that make me go huh?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sho		</title>
		<link>https://jessewarden.com/2006/05/ruby-chronicles-1-blocks-and-yield.html/comment-page-1#comment-3506</link>

		<dc:creator><![CDATA[Sho]]></dc:creator>
		<pubDate>Fri, 19 May 2006 00:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1012#comment-3506</guid>

					<description><![CDATA[Hey there.

(disclaimer -- I&#039;m not a Ruby programmer)

You&#039;re right. Ruby blocks are similar to AS closures. What I like about the Ruby block syntax is that it makes it easy to define things that feel like part of the language. And the yield statement can make it easier to retain state as you pass control from one block to another, which is great for iterators.

For example, let&#039;s say you wanted to create an array class that has something like &#039;foreach&#039; but only if the array value matches a certain value.

&lt;pre&gt;class MyArray
   def eachMatchingIndex(obj)
      for i in 0..length
        if (self[i] == obj)
           yield(i)
        end
      end
   end
end&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Hey there.</p>
<p>(disclaimer &#8212; I&#8217;m not a Ruby programmer)</p>
<p>You&#8217;re right. Ruby blocks are similar to AS closures. What I like about the Ruby block syntax is that it makes it easy to define things that feel like part of the language. And the yield statement can make it easier to retain state as you pass control from one block to another, which is great for iterators.</p>
<p>For example, let&#8217;s say you wanted to create an array class that has something like &#8216;foreach&#8217; but only if the array value matches a certain value.</p>
<pre>class MyArray
   def eachMatchingIndex(obj)
      for i in 0..length
        if (self[i] == obj)
           yield(i)
        end
      end
   end
end</pre>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
