[Issue 3503] [module] Imports should be static by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 14 08:21:46 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3503



--- Comment #4 from Leandro Lucarella <llucax at gmail.com> 2009-11-14 08:21:45 PST ---
(In reply to comment #3)
> Another thing to consider is that usually D modules have at least a package,
> like foo.bar.  And in the case of Tango often several. In most cases that makes
> the full module name too long for you to want to type it again and again.   So
> static import is almost never what you want.  You either want full import, or
> you want renamed import.  So by making this change you make the default the
> least useful thing, which just seems the wrong choice for a default.
> 
> If the default were something like a renamed import, using the leaf name as the
> name, that might be reasonable:
> I.e.
> 
>      import std.stdio;
> 
> Would mean the same as this currently:
> 
>      import stdio = std.stdio;

Exactly, that's what bug 3505 is all about, I think if this is implemented, bug
3505 should be implemented too (and maybe bug 3504). I filled 2 separated bugs
for them because they are indeed orthogonal features, even when they play
better together.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list