Well, no one is preventing us from making
import absolute reserved. I guess reusing
package has its benefits over this approach, but it also leads to the increase of overloading of
package, we already have
package object, and the new one will be slightly different in semantics.
Fair enough, I didn’t read it this way. In my opinion,
import absolute is more intuitive, whereas
import package has two advantages:
- Reuse of
- Use of absolute imports in expressions.
I guess just because of 2), it makes sense to go for
Nevermind, this is a personal preference.
import package._ will need to have the same semantics as
scala> import _root_._
<console>:11: error: _root_ cannot be imported
Depending on the implementation, this may or may not be the case.