Talk:Scala (programming language)

This is an old revision of this page, as edited by DavidBiesack (talk | contribs) at 22:17, 7 February 2008 (Quick sort example: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 17 years ago by DavidBiesack in topic Quick sort example

This page is a copy of the "Scala programming language" page linked at the bottom, almost word-for-word.

Promotion.

Seems to me that this article is a bit too promoting of the Scala language. A more neutral p-o-w would be in place.

Which parts specifically do you think should be changed? -- Phouk


12.27.255.133 21:51, 27 September 2007 (UTC) The Scala homepage doesn't say anything about .Net, just the JVM...Reply

See point 5.2 in the faq (http://www.scala-lang.org/docu/faq.html#id2244551): Q: Does Scala work on .NET? A: There are plans for Scala to run on .NET, and the previous version of Scala ran on .NET, but the current version does not. While .NET has many similarities to Java, it has enough idiosyncrasies that the port is non-trivial. -- Phouk

Quick sort example

I propose the following variant of quick sort, which uses List.partition and does a slightly simpler concatenation. I think it is easier to understand.

 def qsort(l: List[Int]): List[Int] = {
   l match {
       case Nil => l
       case pivot :: tail =>
       {
         val (lt, gte) = tail.partition(_ < pivot)
         qsort(lt) ::: pivot :: qsort(gte)
       }
   }
 }

Opinions?

--DavidBiesack (talk) 22:17, 7 February 2008 (UTC)Reply