Abhijit Sarkar Abhijit Sarkar - 16 days ago 7
Scala Question

Scala package style difference

Scala

package
is cumulative, so
package a.b
can also be written as

package a
package b


Is there any difference between these or is it just a matter of programming style?

Answer

The difference is that with

package a
package b

everything from package a is in scope, not just from a.b.