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.
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.
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.
Is that java.awt.List or java.util.List?
import com.package.foo.bar.Something as barSomething
according to the documentation:
https://kotlinlang.org/docs/reference/packages.htmlAlthough you'd have to do it for each class, so importing the whole package with an alias would be nice.
- import com.package.foo.Bar -> use Bar.methodOfBar() in code
- import static com.package.foo.Bar -> use methodOfBar() in code
What does "import com.package.foo.bar as bar" add? Other than some kind of aliasing, as in you import Bar, but alias it as Baz, so then you use Baz.methodOfBar() ..?