Thanks for reminding me of the recent thread, where Jason had pointed out the spec.
That
https://groups.google.com/d/topic/scala-debate/Tt1XnL_JF7k/discussion
was another great thread. Or good thread anyway. It would have been a rhetorically great thread if Jason had had the opportunity to respond to Daniel's "(hence the "regardless")" with a "(hence the "irregardless")".
I'm not 100% persuaded by the argument to disambiguate. More examples besides Node ("What *is* this node anyway?") might be compelling.
The counter-argument is: We rely on the compiler for various kinds of support, especially where the brain fails, such as variance annotations. Here the compiler is telling us: "You asked for ambiguous imports, are you sure you didn't really mean the one that isn't accessible?" Do we mean to reply, "I always know what I'm importing, even wildcardly."
An alternative solution is: "Yes, I really meant to get public API from bar and protected API from baz, please ignore private bar.Foo." Let me fix that:
import public bar._
import protected baz._
This way, I'm not depending upon accidents of access (such as whether this code has been refactored to another package).
As a lark,
import public bar.Foo
would verify that Foo is public and not private [foob].
Is it true that most Scala code is public by dint of limiting keystrokes; and anything that's not public is made so by the inliner? But seriously, this use case should interoperate with any future package object module feature; maybe I could say
import package bar._
to mean whatever API is "exported" in package object bar (not including implicits that are protected[bar], for instance).
Sorry for scala-debating on scala-language, I got carried away.