title: Scala implicit object vs implicit val
body: <p>I've seen two ways (one less than the other) of declaring <code>implicit</code> for <strong>typeclass pattern</strong> in Scala. </p>
  
  <pre><code>implicit val instance1 = new Typeclass { def do = ??? }
  implicit object instance2 extends Typeclass { def do = ??? }
  </code></pre>
  
  <p>How are they different? Should one prefer one to the other for certain times? I find <code>implicit val</code> much more commonly used than <code>implicit object</code> and I've yet to find many resources about <code>implicit object</code>.</p>