Scala Projects – Best Practices for Packaging

packagesscala

Scala runs on the JVM, but that doesn't mean we have to write it like Java. Eclipse discourages use of the default package. What are some considerations (e.g. size of project) that determine how code ought to be packaged in Scala?

Best Answer

Scala package best practices are generally the same as Java conventions, according to the Style Guide.

// wrong!
package coolness
// right!
package com.novell.coolness
// right, for package object com.novell.coolness
package com.novell
/**
 * Provides classes related to coolness
 */
package object coolness {
}
Related Topic