-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Remove glob-import functionality completely #305
Comments
I suggest allowing module writers to define a list of names which a glob-import would pull into the target namespace, and emit an error if the module is glob-imported but does not define one. The model here is the The main use case for glob-importing seems to be easing the fingers of the user when following good practice in breaking their code into multiple crates; this covers that without the unfortunate consequences in every other situation which lead people to call for eliminating glob-imports entirely. |
Glob imports are now stable, and so I'm going to give this a close. |
But not bug free, sadly :P |
What software is? Anyway, bugs should certainly be filed in rust-lang/rust |
Fix a race in Shared where it blocks forever
Sunday Jan 26, 2014 at 22:47 GMT
For earlier discussion, see rust-lang/rust#11825
This issue was labelled with: B-RFC in the Rust repository
Glob import statements are a frequent cause of confusion and bugs in Rust code. They currently exist behind a feature gate, so there is already some pressure against them.
I suggest removing them completely. The only thing I can think of that would be a significant issue about removing the glob functionality would be how it affects the prelude. However, we could just special case prelude functionality.
The advantage of this is that would make the resolution algorithm much simpler, since the glob import functionality adds significant complexity.
cc @pcwalton
The text was updated successfully, but these errors were encountered: