You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In that sense, there is an impedance mismatch between this syntax and the "mental model" for rooted packages. But it's just syntax.
Also, note that predef is not an import: it competes at level 4 precedence.
I don't know whether users commonly mask predef, where you'd normally ask for -Yno-imports or whatever, but it seems healthy to provide another tool in controlling the "global" namespace, which can be polluted by anything on the class path.
Currently, it's possible to specify a root for hygienic purposes, but not exclude it for convenience.
The text was updated successfully, but these errors were encountered:
ckipp01
transferred this issue from lampepfl/dotty-feature-requests
May 31, 2023
Currently, we can only mask a root context that is a "predef" object.
It would be nice to also mask an arbitrary package introduced by a root context, such as
import _root_.java as _
.It would be even nicer to mask rooted packages from the class path.
Unfortunately, rooted packages are not currently modeled as root contexts per se.
#14781 (comment)
In that sense, there is an impedance mismatch between this syntax and the "mental model" for rooted packages. But it's just syntax.
Also, note that predef is not an import: it competes at level 4 precedence.
I don't know whether users commonly mask predef, where you'd normally ask for
-Yno-imports
or whatever, but it seems healthy to provide another tool in controlling the "global" namespace, which can be polluted by anything on the class path.Currently, it's possible to specify a root for hygienic purposes, but not exclude it for convenience.
The text was updated successfully, but these errors were encountered: