<?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: A Quirk in List.Find()</title>
	<atom:link href="http://buffered.io/2009/03/25/a-quirk-in-listfind/feed/" rel="self" type="application/rss+xml" />
	<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/</link>
	<description>What would OJ do?</description>
	<lastBuildDate>Wed, 08 Sep 2010 12:46:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: James R</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-1242</link>
		<dc:creator>James R</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-1242</guid>
		<description>Welcome to my parlour said the spider to the fly!

After the pain of using the Find method in pre .Net ADO, I was just thinking of getting back into the water with Find in the generic lists, now you are ringing the shark alarm.

I agree, having the Find method looking like the various TryParse methods would be more intuitive and useful.</description>
		<content:encoded><![CDATA[<p>Welcome to my parlour said the spider to the fly!</p>
<p>After the pain of using the Find method in pre .Net ADO, I was just thinking of getting back into the water with Find in the generic lists, now you are ringing the shark alarm.</p>
<p>I agree, having the Find method looking like the various TryParse methods would be more intuitive and useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James R</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-3424</link>
		<dc:creator>James R</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-3424</guid>
		<description>Welcome to my parlour said the spider to the fly!

After the pain of using the Find method in pre .Net ADO, I was just thinking of getting back into the water with Find in the generic lists, now you are ringing the shark alarm.

I agree, having the Find method looking like the various TryParse methods would be more intuitive and useful.</description>
		<content:encoded><![CDATA[<p>Welcome to my parlour said the spider to the fly!</p>
<p>After the pain of using the Find method in pre .Net ADO, I was just thinking of getting back into the water with Find in the generic lists, now you are ringing the shark alarm.</p>
<p>I agree, having the Find method looking like the various TryParse methods would be more intuitive and useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-1241</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:27:33 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-1241</guid>
		<description>@James R: I was waiting for someone to say that ;) Along with FindIndex(), Contains() adds unnecessary overhead.

The thing is, I want to find out if the item exists and get a reference to it. Having said that, this might not be such an issue for value types.

What we need is to determine if something is in a list and get a handle to it regardless of whether it is a value type or a reference type. Contains() doesn&#039;t do that, and neither does FindIndex(), as you need to make further calls to get a handle.

I certainly wouldn&#039;t be using a List&lt;T&gt; at all if I wanted performance across a large dataset, so you could say that I&#039;m optimising unnecessarily. The point for me is that the Find() method is counter-intuitive if you haven&#039;t read the documentation. It should be more indicative of what it&#039;s doing for both value and reference types.

Cheers!</description>
		<content:encoded><![CDATA[<p>@James R: I was waiting for someone to say that <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';)' class='wp-smiley' /> Along with FindIndex(), Contains() adds unnecessary overhead.</p>
<p>The thing is, I want to find out if the item exists and get a reference to it. Having said that, this might not be such an issue for value types.</p>
<p>What we need is to determine if something is in a list and get a handle to it regardless of whether it is a value type or a reference type. Contains() doesn&#8217;t do that, and neither does FindIndex(), as you need to make further calls to get a handle.</p>
<p>I certainly wouldn&#8217;t be using a List&lt;T&gt; at all if I wanted performance across a large dataset, so you could say that I&#8217;m optimising unnecessarily. The point for me is that the Find() method is counter-intuitive if you haven&#8217;t read the documentation. It should be more indicative of what it&#8217;s doing for both value and reference types.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-3423</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-3423</guid>
		<description>@James R: I was waiting for someone to say that ;) Along with FindIndex(), Contains() adds unnecessary overhead.

The thing is, I want to find out if the item exists and get a reference to it. Having said that, this might not be such an issue for value types.

What we need is to determine if something is in a list and get a handle to it regardless of whether it is a value type or a reference type. Contains() doesn&#039;t do that, and neither does FindIndex(), as you need to make further calls to get a handle.

I certainly wouldn&#039;t be using a List&lt;T&gt; at all if I wanted performance across a large dataset, so you could say that I&#039;m optimising unnecessarily. The point for me is that the Find() method is counter-intuitive if you haven&#039;t read the documentation. It should be more indicative of what it&#039;s doing for both value and reference types.

Cheers!</description>
		<content:encoded><![CDATA[<p>@James R: I was waiting for someone to say that <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';)' class='wp-smiley' /> Along with FindIndex(), Contains() adds unnecessary overhead.</p>
<p>The thing is, I want to find out if the item exists and get a reference to it. Having said that, this might not be such an issue for value types.</p>
<p>What we need is to determine if something is in a list and get a handle to it regardless of whether it is a value type or a reference type. Contains() doesn&#8217;t do that, and neither does FindIndex(), as you need to make further calls to get a handle.</p>
<p>I certainly wouldn&#8217;t be using a List&lt;T&gt; at all if I wanted performance across a large dataset, so you could say that I&#8217;m optimising unnecessarily. The point for me is that the Find() method is counter-intuitive if you haven&#8217;t read the documentation. It should be more indicative of what it&#8217;s doing for both value and reference types.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James R</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-1240</link>
		<dc:creator>James R</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-1240</guid>
		<description>You can use the Contains method, list.Contains(4) will return false in your example.

However, if the list is long performance may be affected as the documentation notes that the method performs a linear search. Also, I do not know how efficient the method is if the list is not of a simple type.</description>
		<content:encoded><![CDATA[<p>You can use the Contains method, list.Contains(4) will return false in your example.</p>
<p>However, if the list is long performance may be affected as the documentation notes that the method performs a linear search. Also, I do not know how efficient the method is if the list is not of a simple type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James R</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-3422</link>
		<dc:creator>James R</dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-3422</guid>
		<description>You can use the Contains method, list.Contains(4) will return false in your example.

However, if the list is long performance may be affected as the documentation notes that the method performs a linear search. Also, I do not know how efficient the method is if the list is not of a simple type.</description>
		<content:encoded><![CDATA[<p>You can use the Contains method, list.Contains(4) will return false in your example.</p>
<p>However, if the list is long performance may be affected as the documentation notes that the method performs a linear search. Also, I do not know how efficient the method is if the list is not of a simple type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-1239</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Wed, 25 Mar 2009 22:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-1239</guid>
		<description>@Sergey: Thank you for attempting to justify your position. In my view, nobody with a solid understanding of C#, the .NET framework and the CLR would have made the comments you have just made. Until you brush up on your understanding and perhaps even &lt;em&gt;use&lt;/em&gt; C# and .NET there&#039;s no point in continuing this conversation.</description>
		<content:encoded><![CDATA[<p>@Sergey: Thank you for attempting to justify your position. In my view, nobody with a solid understanding of C#, the .NET framework and the CLR would have made the comments you have just made. Until you brush up on your understanding and perhaps even <em>use</em> C# and .NET there&#8217;s no point in continuing this conversation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-3421</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Wed, 25 Mar 2009 22:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-3421</guid>
		<description>@Sergey: Thank you for attempting to justify your position. In my view, nobody with a solid understanding of C#, the .NET framework and the CLR would have made the comments you have just made. Until you brush up on your understanding and perhaps even &lt;em&gt;use&lt;/em&gt; C# and .NET there&#039;s no point in continuing this conversation.</description>
		<content:encoded><![CDATA[<p>@Sergey: Thank you for attempting to justify your position. In my view, nobody with a solid understanding of C#, the .NET framework and the CLR would have made the comments you have just made. Until you brush up on your understanding and perhaps even <em>use</em> C# and .NET there&#8217;s no point in continuing this conversation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Shepelev</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-1238</link>
		<dc:creator>Sergey Shepelev</dc:creator>
		<pubDate>Wed, 25 Mar 2009 11:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-1238</guid>
		<description>C# is impossible without .NET. And i believe, C# is nearly all code written for .NET. Is there a point to distinguish them so much? If there is, let me rephrase - .NET implementation of generic list sucks.

It&#039;s good to agree on using same therms, but this didn&#039;t change the point - C# sucks, because it&#039;s underlying (.NET) implementation of generic list sucks. It would be wrong if there was alternative implementation usable from C#. There isn&#039;t one, right?

I think difference is big for .NET developer (i mean those guys who write the actual framework). For end user (developer who uses .NET framework)... Find()-ing item in list is just that tricky and hard to do right way as you wrote. It doesn&#039;t matter, whether is it framework or language problem.</description>
		<content:encoded><![CDATA[<p>C# is impossible without .NET. And i believe, C# is nearly all code written for .NET. Is there a point to distinguish them so much? If there is, let me rephrase &#8211; .NET implementation of generic list sucks.</p>
<p>It&#8217;s good to agree on using same therms, but this didn&#8217;t change the point &#8211; C# sucks, because it&#8217;s underlying (.NET) implementation of generic list sucks. It would be wrong if there was alternative implementation usable from C#. There isn&#8217;t one, right?</p>
<p>I think difference is big for .NET developer (i mean those guys who write the actual framework). For end user (developer who uses .NET framework)&#8230; Find()-ing item in list is just that tricky and hard to do right way as you wrote. It doesn&#8217;t matter, whether is it framework or language problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Shepelev</title>
		<link>http://buffered.io/2009/03/25/a-quirk-in-listfind/comment-page-1/#comment-3420</link>
		<dc:creator>Sergey Shepelev</dc:creator>
		<pubDate>Wed, 25 Mar 2009 11:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=675#comment-3420</guid>
		<description>C# is impossible without .NET. And i believe, C# is nearly all code written for .NET. Is there a point to distinguish them so much? If there is, let me rephrase - .NET implementation of generic list sucks.

It&#039;s good to agree on using same therms, but this didn&#039;t change the point - C# sucks, because it&#039;s underlying (.NET) implementation of generic list sucks. It would be wrong if there was alternative implementation usable from C#. There isn&#039;t one, right?

I think difference is big for .NET developer (i mean those guys who write the actual framework). For end user (developer who uses .NET framework)... Find()-ing item in list is just that tricky and hard to do right way as you wrote. It doesn&#039;t matter, whether is it framework or language problem.</description>
		<content:encoded><![CDATA[<p>C# is impossible without .NET. And i believe, C# is nearly all code written for .NET. Is there a point to distinguish them so much? If there is, let me rephrase &#8211; .NET implementation of generic list sucks.</p>
<p>It&#8217;s good to agree on using same therms, but this didn&#8217;t change the point &#8211; C# sucks, because it&#8217;s underlying (.NET) implementation of generic list sucks. It would be wrong if there was alternative implementation usable from C#. There isn&#8217;t one, right?</p>
<p>I think difference is big for .NET developer (i mean those guys who write the actual framework). For end user (developer who uses .NET framework)&#8230; Find()-ing item in list is just that tricky and hard to do right way as you wrote. It doesn&#8217;t matter, whether is it framework or language problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
