Reputation: 113
Very basic question here:
Are there any disadvantages to using the ".*" qualifier when stating our imports into ActionScript files.
In other words, is this only a compile-time directive or does this actually affect the footprint and performance of our final builds?
TIA
Upvotes: 3
Views: 841
Reputation: 4984
As far as I know, it's just a compiler directive to resolve names. The alternative would be to fully qualify everything everywhere, which quickly becomes a syntactical inconvenience.
I.e. the following two examples should be identical in bytecode:
import foo.bar.*;
var MyClass;
Vs.
import foo.bar.MyClass;
var MyClass;
The difference being of course that the compiler will need additional directives to resolve additional types in the same package, i.e.:
import foo.bar.MyClass;
import foo.bar.MyOtherClass;
var MyClass;
var MyOtherClass;
Vs.
import foo.bar.*;
var MyClass;
var MyOtherClass;
Upvotes: 2