import and using syntax #44
RupertAvery
started this conversation in
General
Replies: 1 comment
-
|
Import + using seem really redundant. I would expect an import statement to do all I need. In the case of ambiguity there are options:
Some languages combine both 1 and 2 using different statements, e.g. import (explicit list needed), open (everything is imported implicitly) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Most of the time, the user will want to use imported module's classes, functions directly (not sure about variables)
I still think that import/using introduces redundant code.
Is it possible to allow import to also do the same function as using all in one statement?
And still allow specifying the module, in the event of ambiguity:
Current behavior
Right now, there is no warning for ambiguity, and importing /using two modules with the same methods will end up with the FIRST imported module's declarations winning.
Beta Was this translation helpful? Give feedback.
All reactions