Skip to content
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

feature: purge all * imports #315

Open
nick1udwig opened this issue Apr 24, 2024 · 3 comments
Open

feature: purge all * imports #315

nick1udwig opened this issue Apr 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@nick1udwig
Copy link
Member

Is your feature request related to a problem? Please describe.
Its hard to tell where imports are coming from when you import as

use foo::bar::*
use baz::biz::*

Describe the solution you'd like
Make all imports explicit.

@nick1udwig nick1udwig added the enhancement New feature or request label Apr 24, 2024
@dr-frmr
Copy link
Member

dr-frmr commented Apr 30, 2024

@nick1udwig I support this in the runtime, but I have a hard time not importing * from kinode_process_lib inside apps. What do you think of that? Is it a reasonable exception?

@nick1udwig
Copy link
Member Author

nick1udwig commented Apr 30, 2024

My claim is that it is a better practice in general to have explicit imports. I suppose if you only import * from a single crate it isn't as big of a deal as when you do it from >1 crates, since then you can infer "oh it came from the only crate that is *d". However, you do still lose some traceability in that I can no longer just search that function name and find either its

  1. definition
  2. use foo::bar::the_func;

which is a loss in traceability.

@dr-frmr
Copy link
Member

dr-frmr commented Jun 25, 2024

#419 starts upon this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants