<?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: Comparing Ruby and C#: Equality</title>
	<atom:link href="http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/</link>
	<description>Personal blog</description>
	<lastBuildDate>Mon, 28 Jun 2010 17:51:50 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Andreas</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15016</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Sat, 20 Mar 2010 10:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15016</guid>
		<description>Just some comments:

The Colophon sample is somewhat unfortunate because the String case of
System.Console.WriteLine (Object.ReferenceEquals (obj0, obj1));
will deliver somesthing completely different from what somebody would expect after your post.

And the explanation for Equals() is problematic. Equals SHOULD deliver if two instances are - well - equal, NOT that they are the same reference. It is right that the default implementation works like that, but it SHOULD be overridden in subclasses to test for content equality.</description>
		<content:encoded><![CDATA[<p>Just some comments:</p>
<p>The Colophon sample is somewhat unfortunate because the String case of<br />
System.Console.WriteLine (Object.ReferenceEquals (obj0, obj1));<br />
will deliver somesthing completely different from what somebody would expect after your post.</p>
<p>And the explanation for Equals() is problematic. Equals SHOULD deliver if two instances are &#8211; well &#8211; equal, NOT that they are the same reference. It is right that the default implementation works like that, but it SHOULD be overridden in subclasses to test for content equality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Carrion</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15014</link>
		<dc:creator>Mario Carrion</dc:creator>
		<pubDate>Thu, 18 Mar 2010 22:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15014</guid>
		<description>@yoeri Fixed!
@doza You are &lt;strong&gt;absolutely&lt;/strong&gt; right. Post updated.</description>
		<content:encoded><![CDATA[<p>@yoeri Fixed!<br />
@doza You are <strong>absolutely</strong> right. Post updated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doza</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15013</link>
		<dc:creator>doza</dc:creator>
		<pubDate>Thu, 18 Mar 2010 07:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15013</guid>
		<description>Ruby doesn&#039;t have weak typing, you probably meant dynamic</description>
		<content:encoded><![CDATA[<p>Ruby doesn&#8217;t have weak typing, you probably meant dynamic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yoeri</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15012</link>
		<dc:creator>yoeri</dc:creator>
		<pubDate>Thu, 18 Mar 2010 06:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15012</guid>
		<description>Hi, small typo ... Ruby equal? line 11 should say b and a are different types, now it says b and c are different types.

grtz
y</description>
		<content:encoded><![CDATA[<p>Hi, small typo &#8230; Ruby equal? line 11 should say b and a are different types, now it says b and c are different types.</p>
<p>grtz<br />
y</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Carrion</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15011</link>
		<dc:creator>Mario Carrion</dc:creator>
		<pubDate>Wed, 17 Mar 2010 20:09:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15011</guid>
		<description>I &lt;strong&gt;totally&lt;/strong&gt; agree with you, overriding &lt;em&gt;Equals()&lt;/em&gt; or &lt;em&gt;==&lt;/em&gt; will change the meaning of the original method or operator. The idea of this post was to show the default implementations, explaining why would it be different is out the scope. Thanks for bringing this up, is important to tell this difference.</description>
		<content:encoded><![CDATA[<p>I <strong>totally</strong> agree with you, overriding <em>Equals()</em> or <em>==</em> will change the meaning of the original method or operator. The idea of this post was to show the default implementations, explaining why would it be different is out the scope. Thanks for bringing this up, is important to tell this difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sukru</title>
		<link>http://blog.carrion.mx/2010/03/17/comparing-ruby-and-c-equality/comment-page-1/#comment-15009</link>
		<dc:creator>sukru</dc:creator>
		<pubDate>Wed, 17 Mar 2010 19:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.carrion.ws/?p=637#comment-15009</guid>
		<description>There is a small mixup in titles:
 &quot;Method equal?&quot;
 and &quot;Operator equals (==)&quot; are swapped i Ruby section.

Also while base C# object.Equals implementation is as you describe (reference for reference, bitwise for value), sub-classes are able to (and often do) implement value equality by overriding the method:

http://msdn.microsoft.com/en-us/library/bsc2ak47.aspx

Note that a derived type might override the Equals  method to implement value equality. Value equality means the compared objects have the same value even though they have different binary representations. For example, consider two Decimal  objects that represent the numbers 1.10 and 1.1000. The Decimal  objects do not have bitwise equality because they have different binary representations to account for the different number of trailing zeroes. However, the objects have value equality because the numbers 1.10 and 1.1000 are considered equal for comparison purposes since the trailing zeroes are insignificant.</description>
		<content:encoded><![CDATA[<p>There is a small mixup in titles:<br />
 &#8220;Method equal?&#8221;<br />
 and &#8220;Operator equals (==)&#8221; are swapped i Ruby section.</p>
<p>Also while base C# object.Equals implementation is as you describe (reference for reference, bitwise for value), sub-classes are able to (and often do) implement value equality by overriding the method:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bsc2ak47.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bsc2ak47.aspx</a></p>
<p>Note that a derived type might override the Equals  method to implement value equality. Value equality means the compared objects have the same value even though they have different binary representations. For example, consider two Decimal  objects that represent the numbers 1.10 and 1.1000. The Decimal  objects do not have bitwise equality because they have different binary representations to account for the different number of trailing zeroes. However, the objects have value equality because the numbers 1.10 and 1.1000 are considered equal for comparison purposes since the trailing zeroes are insignificant.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
