As far as I see, if
creates a new member element in class
A, then it suffices to only have import package.element.
If it is some kind of delegation, then it suffice to use an extension function:
def (a: A) element: SomeType = package.element;
or maybe some kind of in-place variant in classes in case of access restrictions:
It’s necessary precisely because such forwarding functions are tedious to write and do not update automatically when their targets change.
For example, suppose I want to make my own Predef and put my most commonly used libraries there. In Scala 2 this is a huge, truly arduous task. In Scala 3 it’s a few lines:
IMHO this is the best new feature in Dotty, addressing a long-time concern. The only thing better would be to also have Kotlin-esque scope injection to go with exports.
Yes, it is. Especially now that package object is dropped.