Scala - Package


The content of a package can be scattered across many files.


The following statement at the top of a file makes the code in a file part of the package



Package hierarchies should be reflected in directory structure.

A source file defining class myClass in package should be stored in a subdirecotory as foo/bar/myClass.scala/

Scala does not really enforce this convention, but some tools such as the Scala IDE for eclipse might have problems otherwise.

Powered by ComboStrap