Best Practices? Import and alias same namespace, bad idea?

Flippedbeyond

Well-known member
Joined
Dec 19, 2008
Messages
198
Programming Experience
1-3
quick question, what do you guys think about this? Bad idea, bad practice? or doesn't really matter? low priority. Thanks in advance.

Imports SIMS_GTalkMsgSystem
Imports sgt = SIMS_GTalkMsgSystem
 
You would only ever alias a namespace to overcome a name clash. If you just don't want to have to use the whole long namespace in your code then would simply import. It could be legitimate to do both in situations where you didn't want to use the namespace in code but had to because of a name clash, but such situations would be extremely rare.
 
Thank you, jmcilhinney. Yeah i did it because i had a name clash in one of the classes i created in that namespace, but i used the import because most of them didn't and i really didn't feel like writing the alias over and over just because of a few name clashes. Thanks for the feedback.
 
Back
Top