title: Explanation of singleton objects in Scala
body: <p>I get the coding in that you basically provide an "object SomeClass" and a "class SomeClass" and the companion class is the class declaration and the object is a <a href="http://en.wikipedia.org/wiki/Singleton_pattern" rel="noreferrer">singleton</a>. Of which you cannot create an instance. So... my question is mostly the purpose of a singleton object in this particular instance.</p>
  
  <p>Is this basically just a way to provide class methods in Scala? Like <code>+</code> based methods in <a href="http://en.wikipedia.org/wiki/Objective-C" rel="noreferrer">Objective-C</a>?</p>
  
  <p>I'm reading the <a href="https://rads.stackoverflow.com/amzn/click/com/0981531644" rel="noreferrer" rel="nofollow noreferrer">Programming in Scala</a> book and Chapter 4 just talked about singleton objects, but it doesn't get into a lot of detail on why this matters. </p>
  
  <p>I realize I may be getting ahead of myself here and that it might be explained in greater detail later. If so, let me know. This book is reasonably good so far, but it has a lot of "in Java, you do this", but I have so little Java experience that I sort of miss a bit of the points I fear. I don't want this to be one of those situations. </p>
  
  <p>I don't recall reading anywhere on the <a href="http://booksites.artima.com/programming_in_scala" rel="noreferrer"><em>Programming in Scala</em> website</a> that Java was a prerequisite for reading this book...</p>