I’m a little confused by this. Is this proposing that all paths must be prefixed with self:: (local), super::, or crate:: (global)?
Denying all paths that don’t start with self, super, or crate doesn’t make much sense to me, because a lot of very commonly-used things are paths, including local functions. So the following code would not work under this proposal:
fn foo() { /* do something */ }
fn main() {
foo(); // should be self::foo()
}
I think even local variables technically are paths.[citation needed]
Also, I really like the leading :: for global paths. It mirrors the leading / in global paths to files/directories. Continuing the analogy, self is equivalent to ., and super is ...
Right now some (most?) of the confusion with paths is because of the fact that paths are normally local by default, but are global in use statements. Another solution to this would be to simply make use statements take local/relative paths by default, requiring :: for global/crate-relative paths.