Thursday, June 26, 2008
Thursday, June 26, 2008    

I like verbosity, no question, but I wonder if it matters in the case of using general imports:

import flash.display.*;

versus

import flash.display.Sprite;
import flash.display.BitmapData;
...

I mean, using a wild-card in an import allows you to forget about being really specific and knowing the compiler will only include classes that you actually use in your application. Does it really matter as a point of coding style? 

For me, the wild-card is more than acceptable. But I can see where some might like to see completely verbose imports to clear up any possible confusion for a someone else perusing the code.


2 Comments:

Blogger Danny Miller said...
 

“The major reason you shouldn't conduct lazy imports is because it'll take the Flash much longer to compile. If you take that habit, you'll find yourself waiting longer and longer for your Flash to compile. Especially when you start using larger libraries like Papervision, Aswing, Box2D, etc...”
 
Blogger Steven said...
 

“Is this based on your own experience or is this documented somewhere as fact?”
 
Post comment

Links to this post:


Create a Link

gotoAndStop( topOfPage );