Import improvement

Sönke Ludwig sludwig at outerproduct.org
Tue Oct 16 05:36:52 PDT 2012


Am 10/16/2012 1:53 PM, schrieb Manu:
> 
> What's wrong with the reasonably established '_' module though? Trying
> to make it appear like a source filename is a deception. That may
> confuse the programmer.
> (...)

Again, it has *not* the same meaning as a _.d module. It's just a
single, very special, module. I totally agree with the possible
confusion in general.

But speaking of '_' (and I have to admit that I didn't look at that many
projects) - I've never seen that in the wild. And (IMO) "import
something._" also looks quite awkward and non-self-explanatory, much
more than either "something.all", "something.*" or
"something.something". Making it just into "import somthing;" with some
compiler support would of course change the game.

Leaving all that aside, in larger projects I always just import single
modules and rarely use public imports, only when there are compelling
reasons. So I would definitely welcome something along the lines of what
you proposed.


More information about the Digitalmars-d mailing list