-
Notifications
You must be signed in to change notification settings - Fork 245
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
What should our explicit import policy be? #2339
Comments
We certainly should allow explicit imports, even if they are long, and not remove them once they've been put into place. To me, there should be some 'core' of the library where explicit imports are required, and an 'upper layer' where they are merely encouraged. |
I would argue in favour of mandatory explicit import lists if they |
I'd be happy with mandatory for <= 6. I'd be unhappy to have explicit imports deleted just because they're long. |
NB some recent refactorings do indeed delete 'long' |
Re: @jmougeot 's recent long suite of PRs, where What do we do about the limit cases where eg |
Separately, and belatedly, I've just noticed that, again in Jacques' long series of PRs, the following pattern of qualified import sometimes occurs: import Foo as Foo using (foo) and I'm really not sure whether this either makes sense, or is a good idea? (It does, however, typecheck, with |
I've commented elsewhere on the For the second case (qualified imports), I'm less sure. I still rather like the documentation aspect, but I would not fight very hard if the opposite choice was made. |
"would fight" or wouldn't fight? |
Oops: comment edited. 'not' was missing. Thanks for the gentle prod! |
Given the avalanche of related PRs that @JacquesCarette and @jmougeot have undertaken as related to this issue, might I suggest you both also raise a PR codifying the |
As discussed in #2334 we don't currently have a policy about when imports should use an explicit
using
statement and when it's fine to open the whole module. We should add something to the style guide.I have no particularly strong feelings on the matter.....
The text was updated successfully, but these errors were encountered: