[Issue 3503] [module] Imports should be static by default
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 16 12:46:56 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3503
--- Comment #13 from Leandro Lucarella <llucax at gmail.com> 2009-11-16 12:46:55 PST ---
(In reply to comment #12)
> Another problem with this idea is that the default behavior would kill array
> property syntax:
>
> -------
> module foo;
> void useArray(int[] a) {...}
> -------
> module main;
> import foo;
> void main()
> {
> int a = [1,2,3];
> a.useArray(); // Breaks under this proposal
> a.foo.useArray(); // Invalid regardless
> }
> -------
Doesn't kills it, it only make it more explicit:
module main;
import foo: useArray;
void main()
{
int a = [1,2,3];
a.useArray(); // Breaks under this proposal
}
Again, bug 3504 is a good companion for this proposal for some special cases
(like std.string).
--
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