<?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: What are Ruby Symbols?</title>
	<atom:link href="http://charlesmaxwood.com/what-are-ruby-symbols/feed/" rel="self" type="application/rss+xml" />
	<link>http://charlesmaxwood.com/what-are-ruby-symbols/</link>
	<description>Building Careers by Building Skills</description>
	<lastBuildDate>Thu, 17 Jun 2010 07:42:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Allan</title>
		<link>http://charlesmaxwood.com/what-are-ruby-symbols/comment-page-1/#comment-1237</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Thu, 30 Jul 2009 16:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=332#comment-1237</guid>
		<description>Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://charlesmaxwood.com/what-are-ruby-symbols/comment-page-1/#comment-1235</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Wed, 29 Jul 2009 04:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=332#comment-1235</guid>
		<description>The best way I can think of explaining immediate values is numerical values. For example 1 in Ruby is of class Fixnum. If you have a = 1 and b = a, then a and b both refer to the immediate value of 1. If you change it so that a = 2, b still equals 1 because it refers to the immediate value 1. If you have a and b both strings a = &quot;person&quot; and b = a. They both reference the same object. a.reverse! changes a&#039;s stored value to &quot;nosrep&quot;. If you access b, it also contains &quot;nosrep&quot;. With objects of immediate value, you can only change the reference. You cannot change their value. 

With symbols, they are like Fixnum&#039;s. You can refer to them in their immediate and immutable value, but you can&#039;t change the Symbol. It&#039;s like using 1. You can change your variables so they refer to 2, but then you&#039;ve changed the reference, not the value itself. Incidentally, you can call to_i on a Symbol to convert it to it&#039;s integer equivalent, but the integer doesn&#039;t really actually tell you anything useful about the symbol.</description>
		<content:encoded><![CDATA[<p>The best way I can think of explaining immediate values is numerical values. For example 1 in Ruby is of class Fixnum. If you have a = 1 and b = a, then a and b both refer to the immediate value of 1. If you change it so that a = 2, b still equals 1 because it refers to the immediate value 1. If you have a and b both strings a = &#8220;person&#8221; and b = a. They both reference the same object. a.reverse! changes a&#8217;s stored value to &#8220;nosrep&#8221;. If you access b, it also contains &#8220;nosrep&#8221;. With objects of immediate value, you can only change the reference. You cannot change their value. </p>
<p>With symbols, they are like Fixnum&#8217;s. You can refer to them in their immediate and immutable value, but you can&#8217;t change the Symbol. It&#8217;s like using 1. You can change your variables so they refer to 2, but then you&#8217;ve changed the reference, not the value itself. Incidentally, you can call to_i on a Symbol to convert it to it&#8217;s integer equivalent, but the integer doesn&#8217;t really actually tell you anything useful about the symbol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allan</title>
		<link>http://charlesmaxwood.com/what-are-ruby-symbols/comment-page-1/#comment-1234</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Wed, 29 Jul 2009 03:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=332#comment-1234</guid>
		<description>&quot;In this example, you still get the Person object back identifying Nikki, but in this case we don’t have the overhead of an object in the key&quot;
Isn&#039;t (almost) everything in Ruby an Object? You&#039;ll still have an object in the key (an instance of Symbol).
I don&#039;t understand the meaning of &quot;immediate value&quot;. Like primitives in Java?</description>
		<content:encoded><![CDATA[<p>&#8220;In this example, you still get the Person object back identifying Nikki, but in this case we don’t have the overhead of an object in the key&#8221;<br />
Isn&#8217;t (almost) everything in Ruby an Object? You&#8217;ll still have an object in the key (an instance of Symbol).<br />
I don&#8217;t understand the meaning of &#8220;immediate value&#8221;. Like primitives in Java?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
