Andrei Alexandrescu wrote:
On 12/22/11 11:29 AM, Jacob Carlborg wrote:
On 2011-12-22 17:50, Andrei Alexandrescu wrote:
On 12/22/11 4:40 AM, Jacob Carlborg wrote:
It would break code, but it's better to break it sooner than later.
Seems more and more like D should support importing all modules in a
package, that Java does:

import foo.*;

I think this style is currently discouraged in Java.

Andrei

Well, it seems like everyone wants it and there are several libraries
that supports "import foo.all;" to include the whole "foo" package,
including some of my own.

The authors of Java apparently thought the same. It is _experience_ with
the actual feature that turned out to be bad. Last time I used Eclipse
it underlined with red the lines with .*.

I wish D could support partial modules - partial as analogy to C#'s partial classes.

module std.datetime-unit1;
import std.datetime-unit2;
// dash allowed only in submodules with the same module name
...

module std.datetime-unit2;
import std.datetime-unit1;
...

// then

module whatever;
import std.datetime; // as usual

Reply via email to