3 ms·
You'd have to declare both of them in the current module. That's why I don't do glob imports. I would see use foo::signon; use bar::signOn; clearly,
by iopq 12y ago
You'd have to declare both of them in the current module. That's why I don't do glob imports.
I would see
use foo::signon;
use bar::signOn;
clearly, if I have to import this in my own file I should be VERY careful about those two functions
or rather, I'd import from foo, but I'd use the namespaced version from bar
so `signon` would be `foo::signon`, but `bar::signOn` would be written out fully to avoid this kind of clash
- rbehrends 12y agoI'm really not sure what the point of referencing Rust is. This was about programming languages in general, and the post I was referring to was about C#. Also, importing is an example, another example would be accidentally declaring a second variable in the same module (should not happen, but people make errors), or a number of other situations where two identifiers that are identical except for case end up in the same scope.
- iopq 12y agoI'm referencing Rust because I'm working on a Rust project right now. I don't even know C#. Here's how you declare a binding: let signOn; let signon; I seriously hope you don't declare both of these in the same scope