<?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"
	>
<channel>
	<title>Comments on: Ruby&#8217;s Redundant Exclamation Marks</title>
	<atom:link href="http://www.blog.dannynet.net/archives/44/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blog.dannynet.net/archives/44</link>
	<description>Pondering Programming and Poetry</description>
	<pubDate>Fri, 21 Nov 2008 19:39:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Danny</title>
		<link>http://www.blog.dannynet.net/archives/44#comment-151</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Mon, 23 Jan 2006 21:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/44#comment-151</guid>
		<description>Thanks, Assaf. Remco explained the same thing to me today. I guess destructive methods are more than just redundant versions of their non-destructive variants.</description>
		<content:encoded><![CDATA[<p>Thanks, Assaf. Remco explained the same thing to me today. I guess destructive methods are more than just redundant versions of their non-destructive variants.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: assaf</title>
		<link>http://www.blog.dannynet.net/archives/44#comment-150</link>
		<dc:creator>assaf</dc:creator>
		<pubDate>Mon, 23 Jan 2006 20:00:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/44#comment-150</guid>
		<description>if your destructive method is very efficient at manipulating the object, you'll use that first and base the non-destructive method on that. for example:

def gsub(pattern, replace)
  str = dup
  str.gsub!(pattern, replace)
  str
end

if you think beyond strings, and to more generic objects, you can easily create non-destructive methods from destructive methods, by implementing dup. the other way around, you need to implement dup and replace.</description>
		<content:encoded><![CDATA[<p>if your destructive method is very efficient at manipulating the object, you&#8217;ll use that first and base the non-destructive method on that. for example:</p>
<p>def gsub(pattern, replace)<br />
  str = dup<br />
  str.gsub!(pattern, replace)<br />
  str<br />
end</p>
<p>if you think beyond strings, and to more generic objects, you can easily create non-destructive methods from destructive methods, by implementing dup. the other way around, you need to implement dup and replace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny&#8217;s Blog &#187; Blog Archive &#187; Ruby&#8217;s Exclamations: A Dream Come True</title>
		<link>http://www.blog.dannynet.net/archives/44#comment-148</link>
		<dc:creator>Danny&#8217;s Blog &#187; Blog Archive &#187; Ruby&#8217;s Exclamations: A Dream Come True</dc:creator>
		<pubDate>Mon, 23 Jan 2006 08:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/44#comment-148</guid>
		<description>[...] Danny&#8217;s Blog Pondering Programming and Poetry      &#171; Ruby&#8217;s Redundant Exclamation Marks [...]</description>
		<content:encoded><![CDATA[<p>[...] Danny&#8217;s Blog Pondering Programming and Poetry      &laquo; Ruby&#8217;s Redundant Exclamation Marks [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
