Tiraman,
How is Microsoft going to decide which to include on in a source? Should it
include EVERY namespace in the Framework? For a class that has 20 lines of
code you would have 100+ lines of imports. Plus as Cor stated, this may
cause problems for the IDE. When Whidbey (VS.NET 2005) is released there
will be a significant increase in the number of namespaces in the Framework.
If you are not using regular expressions, should Microsoft import the
System.Text.RegularExpression namespace? What happens when you have defined
a Match class and the System.Text.RegularExpression.Match class starts
shadowing your Match class?
If you are creating a Windows Forms application, should System.Web.UI be
imported? What happens when I actually use a class from the above namespace
in my Windows Forms app?
Microsoft does not import all the namespaces because you as developer need
to decide which namespaces are appropriate to the class/structure that you
are currently working on.
Remember that namespaces are used to organize the types (classes,
structures, delegates) in the framework & your assemblies, if you
automatically imported every thing, then you really would not need
namespaces and you would suddenly be disorganized!
Take for example the Timer class, without Namespaces which of the three
Timers are you referring to? System.Threading.Timer, System.Timers.Timer,
or System.Windows.Forms.Timer?
The namespace part of the above Timer's name is what makes each class
distinct from the other, without needing to do something funky like
"ThreadTimer", "ServerTimer", "FormTimer", which IMHO is more awkward then
using the Namespace, considering that the namespace groups related types in
a central location (System.Windows.Forms has all the Windows Forms stuff).
Hope this helps
Jay