You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the meantime, shadowing of variables is prohibited.
Shadowing the module name introduces ambiguity into the language for the reader. If I see that the gg module is imported, I can't be sure that gg.x() is a call to the x() function of the gg module. In the documentation example, this would be a struct method.
I don't see any big advantages in such shadowing, while the cons described above is quite big.
Use Case
See above
Proposed Solution
Forbid local variables with same name as one of the imported modules.
Describe the feature
From doc:
In the meantime, shadowing of variables is prohibited.
Shadowing the module name introduces ambiguity into the language for the reader. If I see that the
gg
module is imported, I can't be sure thatgg.x()
is a call to thex()
function of thegg
module. In the documentation example, this would be a struct method.I don't see any big advantages in such shadowing, while the cons described above is quite big.
Use Case
See above
Proposed Solution
Forbid local variables with same name as one of the imported modules.
Other Information
No response
Acknowledgements
Version used
V 0.3.3 21b17fe.d563739
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: