In this cases, the usual way is to make a package, this way:

== in file MP/M1.d ==
module MP.M1;

// some pieces of the work

== in file MP/M2.d ==
module MP.M2;

// other pieces of the work

== in file MP/package.d ==
module MP;
public import MP.M1;
public import MP.M2;

// public import everything

== in file main.d ==
module main;
import MP;

// can access everything, because publicly imported by MP/package.d

Thank but I know this. There is no benefits in code style .

In this case: can't use MP.d file name and does not relieve duplicate class name to module subpath...
Every where is limit :(

Whole language based on convenient functionality but in modules something is wrong... I know what strongly 1 file = 1 module is simple for implement and not difficult to linking, but few dozen lines will allowed to get rid of naming hell

Reply via email to