Rust is inspired by Python, which has a similar principle: import is all explicit, and although glob support ( use x::* in Rust, from x import * in Python) is supported, they are usually not recommended.
This philosophy does have some practical implications; calling the attribute method, for example, can only be done if the attribute is in scope, and therefore invoking the attribute method when names clash in imported attributes is quite difficult (this will be improved in the future using the Uniform Function Call Syntax, where you can call Trait::function(self) , not just self.function() ).
Basically, this is what Zen of Python expresses well: "Explicit is better than implicit." When a vast area of things is in scope, it can be difficult to understand what happened from where deep knowledge of the structure of the module and / or snap becomes very important; if it is all explicit, the toolkit is largely unnecessary, and working with files manually in a simple text editor is quite feasible. Of course, the toolkit will still be able to help, but this is not so necessary.
That's why Rust adopted the concept of explicit Python imports.
source share