Proposal for an extension to the import syntax
Alexander Panek
a.panek at brainsware.org
Mon Dec 11 23:30:19 PST 2006
> import somebodys.long.package.name.module1 : sym1,sym2,sym3;
That's what came to my mind, too. Though, I wouldn't use the ':' operator.
// might be hard to parse (?) - at least it's clear what's meant (imho)
import somebodys.long.package.name.a, .b, .c;
// might be confused with /+ import foo, bar; +/
import somebodys.long.package.name.a, b, c;
analog to:
uint a,
b,
c;
...just that the type is exchanged with a module/package path.
Other than that, I don't think one should make the import syntax too
blown up. Also, I would restrict multiple module import to one path per
statement, so you don't end up doing nested regex magic in your import
statements. I think of something like
import a.b.[c.[a,b,d.e], f, g]
.. huh? Now guess what happens when you don't use single characters as
module names only. :P
import a.b.c.a, .b, .d, .e;
import a.b.f, .g;
I'd like to have it like that.
Kind regards,
Alex
More information about the Digitalmars-d
mailing list