Coming back to Scala after a spell writing Haskell, I\'ve started using the type keyword to make my class definitions a bit more readable, eg:
type RestfulParams
I'm not sure what constitutes niceness in this case, but here are two options:
Using a trait: (Scala's Selfless Trait Pattern)
trait RestfulTypes {
type Params = Map[String,String]
//...
}
object MyRestService extends RestService with RestfulTypes { /* ... */ }
Or just import the object's members, effectively using it like a package:
import util.RestfulTypes._