I have seen in a few libraries, Spray for example, dual package specifications like this:
package cc.spray
package http
// code
Is this just eye candy for package cc.spray.http, or is there a functional benefit to breaking the two apart like this?
That is equivalent to this:
That is, every member of package
cc.sprayand of packagecc.spray.httpare visible. On the other hand, members of the packageccare not visible.This way one can safely use names such as
javain their package hierarchy without causing trouble, and, at the same time, easily make visible the package scopes one wants to be visible.