<?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: Quicksort in Scala</title>
	<atom:link href="http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/</link>
	<description>Tips around Java, Eclipse and Web programming</description>
	<lastBuildDate>Sat, 04 Sep 2010 10:08:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Chris Wong</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-1003</link>
		<dc:creator>Chris Wong</dc:creator>
		<pubDate>Sun, 15 Nov 2009 05:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-1003</guid>
		<description>Thanks for the example. Would it look similar with a list of Comparable objects rather than a specific Int type? I posted related thoughts about conciseness here, referencing this post, along with a sample Groovy implementation:

http://chriswongdevblog.blogspot.com/2009/11/on-conciseness.html</description>
		<content:encoded><![CDATA[<p>Thanks for the example. Would it look similar with a list of Comparable objects rather than a specific Int type? I posted related thoughts about conciseness here, referencing this post, along with a sample Groovy implementation:</p>
<p><a href="http://chriswongdevblog.blogspot.com/2009/11/on-conciseness.html" rel="nofollow">http://chriswongdevblog.blogspot.com/2009/11/on-conciseness.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogério Liesenfeld</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-1001</link>
		<dc:creator>Rogério Liesenfeld</dc:creator>
		<pubDate>Sat, 14 Nov 2009 01:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-1001</guid>
		<description>The last line above got truncated; it should be:

      [sort(a[n &#124; n &lt; pivot]), a[n &#124; n == pivot], sort(a[n &#124; n &gt; pivot])];</description>
		<content:encoded><![CDATA[<p>The last line above got truncated; it should be:</p>
<p>      [sort(a[n | n &lt; pivot]), a[n | n == pivot], sort(a[n | n &gt; pivot])];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogério Liesenfeld</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-1000</link>
		<dc:creator>Rogério Liesenfeld</dc:creator>
		<pubDate>Sat, 14 Nov 2009 01:44:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-1000</guid>
		<description>This is the JavaFX Script version for a QuickSort function:
&lt;code&gt;
function sort(a: Integer[]): Integer[]
{
   if (sizeof a &lt; 2) a
   else {
      def pivot = a[sizeof a / 2];
      [sort(a[n &#124; n  pivot])];
   }
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This is the JavaFX Script version for a QuickSort function:<br />
<code><br />
function sort(a: Integer[]): Integer[]<br />
{<br />
   if (sizeof a &lt; 2) a<br />
   else {<br />
      def pivot = a[sizeof a / 2];<br />
      [sort(a[n | n  pivot])];<br />
   }<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-999</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Fri, 13 Nov 2009 21:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-999</guid>
		<description>@JohnDoe: Nice &amp; thanks. Coding updated, I also find this representation more concise.</description>
		<content:encoded><![CDATA[<p>@JohnDoe: Nice &amp; thanks. Coding updated, I also find this representation more concise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnDoe</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-998</link>
		<dc:creator>JohnDoe</dc:creator>
		<pubDate>Fri, 13 Nov 2009 21:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-998</guid>
		<description>http://www.scala-lang.org/docu/files/api/scala/Array.html

override def ++[B &gt;: A](that : Iterable[B]) : Array[B]

    Returns an array consisting of all elements of this array followed by all elements of the argument iterable.</description>
		<content:encoded><![CDATA[<p><a href="http://www.scala-lang.org/docu/files/api/scala/Array.html" rel="nofollow">http://www.scala-lang.org/docu/files/api/scala/Array.html</a></p>
<p>override def ++[B &gt;: A](that : Iterable[B]) : Array[B]</p>
<p>    Returns an array consisting of all elements of this array followed by all elements of the argument iterable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-997</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Fri, 13 Nov 2009 20:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-997</guid>
		<description>@Noct: To my knowledge Scala does not define function &quot;+&quot; on Array. See also  http://www.scala-lang.org/docu/files/api/scala/Array$object.html</description>
		<content:encoded><![CDATA[<p>@Noct: To my knowledge Scala does not define function &#8220;+&#8221; on Array. See also  <a href="http://www.scala-lang.org/docu/files/api/scala/Array$object.html" rel="nofollow">http://www.scala-lang.org/docu/files/api/scala/Array$object.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noct</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-996</link>
		<dc:creator>Noct</dc:creator>
		<pubDate>Fri, 13 Nov 2009 20:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-996</guid>
		<description>Comparing to groovy quicksort impl:

def quickSort(lst){
	if(lst.size() 
		if(item &lt; pivot){ less.add(item)}
		else{greater.add(item)}
	}
	return quickSort(less)+[pivot]+quickSort(greater)
}

I find &quot;return quickSort(less)+[pivot]+quickSort(greater)&quot; more concise, but you can override the + operator in scala to append lists. Or does it behave that way by default?</description>
		<content:encoded><![CDATA[<p>Comparing to groovy quicksort impl:</p>
<p>def quickSort(lst){<br />
	if(lst.size()<br />
		if(item &lt; pivot){ less.add(item)}<br />
		else{greater.add(item)}<br />
	}<br />
	return quickSort(less)+[pivot]+quickSort(greater)<br />
}</p>
<p>I find &quot;return quickSort(less)+[pivot]+quickSort(greater)&quot; more concise, but you can override the + operator in scala to append lists. Or does it behave that way by default?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NN</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-995</link>
		<dc:creator>NN</dc:creator>
		<pubDate>Fri, 13 Nov 2009 19:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-995</guid>
		<description>Is there a benchmark comparison to a java array based quicksort available?
How are the memory requirements - is the compiler able to generate bytecode that uses int[]?
What happens with a sort(sort: Array[Number])?</description>
		<content:encoded><![CDATA[<p>Is there a benchmark comparison to a java array based quicksort available?<br />
How are the memory requirements &#8211; is the compiler able to generate bytecode that uses int[]?<br />
What happens with a sort(sort: Array[Number])?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-993</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Fri, 13 Nov 2009 16:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-993</guid>
		<description>@XXX I would agree that this saves one sign and that this is good. But other then that does this makes a difference? Anyway I adjusted the code, less is more. :-)</description>
		<content:encoded><![CDATA[<p>@XXX I would agree that this saves one sign and that this is good. But other then that does this makes a difference? Anyway I adjusted the code, less is more. <img src='http://www.vogella.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: XXX</title>
		<link>http://www.vogella.de/blog/2009/11/13/quicksort-in-scala/comment-page-1/#comment-992</link>
		<dc:creator>XXX</dc:creator>
		<pubDate>Fri, 13 Nov 2009 16:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=1283#comment-992</guid>
		<description>if (array.length &lt;2) array is slightly better :)</description>
		<content:encoded><![CDATA[<p>if (array.length &lt;2) array is slightly better <img src='http://www.vogella.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
