These compilation units should be placed within a file named within the com/novell/coolness
directory. In short, theJava file naming and positioning conventions should be preferred,despite the fact that Scala allows for greater flexibility in thisregard.
sealed trait Option[+A]
case class Some[A](a: A) extends Option[A]
Because of the nature of sealed superclasses (and traits), all subtypesmust be included in the same file. Thus, such a situation definitelyqualifies as an instance where the preference for single-unit filesshould be ignored.
All multi-unit files should be given camelCase names with a lower-casefirst letter. This is a very important convention. It differentiatesmulti- from single-unit files, greatly easing the process of findingdeclarations. These filenames may be based upon a significant type whichthey contain (e.g. option.scala
for the example above), or may bedescriptive of the logical property shared by all units within (e.g.ast.scala
).