<?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: Use self explicitly</title>
	<atom:link href="http://www.rubyfleebie.com/use-self-explicitly/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubyfleebie.com/use-self-explicitly/</link>
	<description>Because programming should be fun</description>
	<lastBuildDate>Thu, 15 Jul 2010 19:48:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Frank</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-852</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Thu, 09 Jul 2009 18:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-852</guid>
		<description>Aljoscha,

This could be a nice to have but at the same time... it could become annoying to see warnings everytime you declare a local variable that happens to have the same name of some instance method in the class hierarchy. I think that Ruby should force us to use &quot;self&quot; even for attribute readers. That way people would stop getting caught by this terrible gotcha. Thanks for you comment!</description>
		<content:encoded><![CDATA[<p>Aljoscha,</p>
<p>This could be a nice to have but at the same time&#8230; it could become annoying to see warnings everytime you declare a local variable that happens to have the same name of some instance method in the class hierarchy. I think that Ruby should force us to use &#8220;self&#8221; even for attribute readers. That way people would stop getting caught by this terrible gotcha. Thanks for you comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aljoscha</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-851</link>
		<dc:creator>Aljoscha</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-851</guid>
		<description>We just got bitten by this.
Now I ask myself (and you): Isn&#039;t there a way to make Ruby emit a warning when this kind of ambiguity occurs (When there is an attribute with that name?) Such a warning could help a lot.</description>
		<content:encoded><![CDATA[<p>We just got bitten by this.<br />
Now I ask myself (and you): Isn&#8217;t there a way to make Ruby emit a warning when this kind of ambiguity occurs (When there is an attribute with that name?) Such a warning could help a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: I was just thinkin&#8217;&#8230; &#187; Rails ActiveRecord callback gotcha!</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-842</link>
		<dc:creator>I was just thinkin&#8217;&#8230; &#187; Rails ActiveRecord callback gotcha!</dc:creator>
		<pubDate>Tue, 09 Jun 2009 14:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-842</guid>
		<description>[...] @self.author_id=1@ as making a method call. Which makes perfect sense when you think about it see &#8220;Use self explicitly&#8221; for more details. (thanks to Craig Webster and Florian Gilcher, via Twitter for clearing this up [...]</description>
		<content:encoded><![CDATA[<p>[...] @self.author_id=1@ as making a method call. Which makes perfect sense when you think about it see &#8220;Use self explicitly&#8221; for more details. (thanks to Craig Webster and Florian Gilcher, via Twitter for clearing this up [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruby&#8217;s not ready - glyphobet • глыфобет • γλυφοβετ</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-553</link>
		<dc:creator>Ruby&#8217;s not ready - glyphobet • глыфобет • γλυφοβετ</dc:creator>
		<pubDate>Mon, 07 Apr 2008 20:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-553</guid>
		<description>[...] at least one case that requires self as an explicit reciever: when calling an attribute writer. Otherwise you&#8217;re just shadowing the attribute writer method locally. It&#8217;s not clear [...]</description>
		<content:encoded><![CDATA[<p>[...] at least one case that requires self as an explicit reciever: when calling an attribute writer. Otherwise you&#8217;re just shadowing the attribute writer method locally. It&#8217;s not clear [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Crisp &#187; Can you spot the bug?</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-309</link>
		<dc:creator>James Crisp &#187; Can you spot the bug?</dc:creator>
		<pubDate>Sat, 28 Jul 2007 09:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-309</guid>
		<description>[...] The answer lies in the fact that Ruby requires an explicit self reference when using attribute writers (aka, property setters) within the class itself. This feels clunky to me, but for your information, here&#8217;s a rationalisation of the explicit self requirement. [...]</description>
		<content:encoded><![CDATA[<p>[...] The answer lies in the fact that Ruby requires an explicit self reference when using attribute writers (aka, property setters) within the class itself. This feels clunky to me, but for your information, here&#8217;s a rationalisation of the explicit self requirement. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabe</title>
		<link>http://www.rubyfleebie.com/use-self-explicitly/comment-page-1/#comment-136</link>
		<dc:creator>Gabe</dc:creator>
		<pubDate>Tue, 17 Apr 2007 18:52:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/use-self-explicitly/#comment-136</guid>
		<description>This is one of those simple things I didn&#039;t know until I read Ruby for Rails.  I highly recommend that book for illuminating numerous small details like this.  Pickaxe is a great reference, but it glosses over a lot of those details in favor of a comprehensive picture of the language.

Another one of these little gotchas is that referencing a non-existent local variable or method raises an exception, whereas a non-existent instance variable returns nil.</description>
		<content:encoded><![CDATA[<p>This is one of those simple things I didn&#8217;t know until I read Ruby for Rails.  I highly recommend that book for illuminating numerous small details like this.  Pickaxe is a great reference, but it glosses over a lot of those details in favor of a comprehensive picture of the language.</p>
<p>Another one of these little gotchas is that referencing a non-existent local variable or method raises an exception, whereas a non-existent instance variable returns nil.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
