title: Scala 2.8 TreeMap and custom Ordering
body: <p>I'm switching from scala 2.7 and ordered to scala 2.8 and using ordering. It looks quite straight forward but I was wondering could I make it a little less verbose. For example:</p>
  
  <pre><code>scala&gt; case class A(i: Int)
  defined class A
  scala&gt; object A extends Ordering[A] { def compare(o1: A, o2: A) = o1.i - o2.i}
  defined module A
  </code></pre>
  
  <p>If I then try to create a TreeMap I get an error</p>
  
  <pre><code>scala&gt; new collection.immutable.TreeMap[A, String]()
  &lt;console&gt;:10: error: could not find implicit value for parameter ordering: Ordering[A]
         new collection.immutable.TreeMap[A, String]()
         ^
  </code></pre>
  
  <p>However if I explicitly specify the object A as the ordering it works fine.</p>
  
  <pre><code>scala&gt; new collection.immutable.TreeMap[A, String]()(A)
  res34: scala.collection.immutable.TreeMap[A,String] = Map()
  </code></pre>
  
  <p>Do I always have to explicitly specify the ordering or is there a shorter format?</p>
  
  <p>Thanks</p>