title: What is the rationale behind having companion objects in Scala?
body: <p>Is there a case where a companion object (singleton) for a class is needed? Why would I want to create a class, say <code>Foo</code> and also create a companion object for it?</p>