<?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: Adding Sorted Inserts to Cocoa Arrays</title>
	<atom:link href="http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sun, 12 Feb 2012 05:23:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ben Lenarts</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-55530</link>
		<dc:creator>Ben Lenarts</dc:creator>
		<pubDate>Mon, 06 Sep 2010 23:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-55530</guid>
		<description>Great work! I created a small repository on Github to hold a debugged version of the code: http://github.com/benlenarts/NSArray-CWSortedInsert</description>
		<content:encoded><![CDATA[<p>Great work! I created a small repository on Github to hold a debugged version of the code: <a href="http://github.com/benlenarts/NSArray-CWSortedInsert" rel="nofollow">http://github.com/benlenarts/NSArray-CWSortedInsert</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Levin</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-17051</link>
		<dc:creator>Ilya Levin</dc:creator>
		<pubDate>Mon, 30 Nov 2009 02:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-17051</guid>
		<description>Very nice addition, but you have a fatal bug. Your search should be compare (...) &gt;0 instead of compare(...) &lt; 0 for it to work, because NSOrderedAscending is returned when the second object is larger then the receiver, which means we need to the lower part of the search range, not the apper part (as long as the same comparison is used as the one used to sort the array)</description>
		<content:encoded><![CDATA[<p>Very nice addition, but you have a fatal bug. Your search should be compare (&#8230;) &gt;0 instead of compare(&#8230;) &lt; 0 for it to work, because NSOrderedAscending is returned when the second object is larger then the receiver, which means we need to the lower part of the search range, not the apper part (as long as the same comparison is used as the one used to sort the array)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rikard Lindell</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-14113</link>
		<dc:creator>Rikard Lindell</dc:creator>
		<pubDate>Thu, 22 Oct 2009 07:27:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-14113</guid>
		<description>Thank you for this very relevant article. It&#039;s a mystery why there is no SortedCollection counterpart in Cocoa/NextStep from the Smalltalk-80 environment, which so clearly have been the main inspiration for Objective-C.

Cheers
Rikard</description>
		<content:encoded><![CDATA[<p>Thank you for this very relevant article. It&#8217;s a mystery why there is no SortedCollection counterpart in Cocoa/NextStep from the Smalltalk-80 environment, which so clearly have been the main inspiration for Objective-C.</p>
<p>Cheers<br />
Rikard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Olsson</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-2701</link>
		<dc:creator>Fredrik Olsson</dc:creator>
		<pubDate>Wed, 01 Apr 2009 07:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-2701</guid>
		<description>For the most common use cases you mentioned, you can use for example: &lt;code&gt;[myArray insertObject:myDate sortedUsingSelector:@selector(compare:)];&lt;/code&gt;.

As a rule of thumb; in Cocoa you should not make wrapper code to simplify something that is already a single statement. Making this even simpler by enforcing a single selector would also break the 1 to 1 feature mapping of the sort methods already available in the official Cocoa classes.
</description>
		<content:encoded><![CDATA[<p>For the most common use cases you mentioned, you can use for example: <code>[myArray insertObject:myDate sortedUsingSelector:@selector(compare:)];</code>.</p>
<p>As a rule of thumb; in Cocoa you should not make wrapper code to simplify something that is already a single statement. Making this even simpler by enforcing a single selector would also break the 1 to 1 feature mapping of the sort methods already available in the official Cocoa classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron VonderHaar</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-2691</link>
		<dc:creator>Aaron VonderHaar</dc:creator>
		<pubDate>Tue, 31 Mar 2009 19:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-2691</guid>
		<description>It looks very useful, although personally I would want to see a simpler API for the most common cases:  for instance, it would be nice to have a version of the sorted insert methods that don&#039;t require a sorting method to passes in, and would instead simply use the compare: selector.  That way it would immediately work with NSNumber, NSString and NSDate, and you could support new objects easily by implementing compare: for those classes.

Thanks for sharing the concept and the code!</description>
		<content:encoded><![CDATA[<p>It looks very useful, although personally I would want to see a simpler API for the most common cases:  for instance, it would be nice to have a version of the sorted insert methods that don&#8217;t require a sorting method to passes in, and would instead simply use the compare: selector.  That way it would immediately work with NSNumber, NSString and NSDate, and you could support new objects easily by implementing compare: for those classes.</p>
<p>Thanks for sharing the concept and the code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sorting NSArray at Under The Bridge</title>
		<link>http://blog.jayway.com/2009/03/28/adding-sorted-inserts-to-uimutablearray/comment-page-1/#comment-2670</link>
		<dc:creator>Sorting NSArray at Under The Bridge</dc:creator>
		<pubDate>Tue, 31 Mar 2009 05:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1441#comment-2670</guid>
		<description>[...] an excellent article on how to do optimized NSArray sorting and NSMutable Array sorted inserts. NSArray admits to sorts [...]</description>
		<content:encoded><![CDATA[<p>[...] an excellent article on how to do optimized NSArray sorting and NSMutable Array sorted inserts. NSArray admits to sorts [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

