4 ms·
> If imports are renamed, you would have to actually care about the import statements. Not really. VS Code transparently handles aliasing of imports in JS. Y
by idontpost 8y ago
> If imports are renamed, you would have to actually care about the import statements.
Not really. VS Code transparently handles aliasing of imports in JS. You still never need to look at them manually AND you get the benefit of cleaner naming.
- halfastack 8y agoI have difficulty seeing what this would add. As a Java developer, I know what "List" is, just like I know what "ArrayList" is. If someone instantiated new better.ArrayList(), I immediately have to check what the hell is the import (go to the top of the class, uncollapse the import statements, and see what is "better"). As with all code readability, I assume to write and use import aliases, that's very easy. The person who's gonna read it after you, they've got a problem. And that's why I'd personally be strongly against this in my code review.
- ptx 8y ago> As a Java developer, I know what "List" is Is that java.awt.List or java.util.List?
- idontpost 8y agoUsing the example from your other reply: import java.awt.List as awtList import java.util.List as utilList Granted, there's not a lot of scenarios where you have this sort of collision, but it does happen and using aliasing makes the code easier to read.