DIP16: Transparently substitute module with package

deadalnix deadalnix at gmail.com
Thu Apr 5 07:53:34 PDT 2012


Le 05/04/2012 16:47, Steven Schveighoffer a écrit :
>> But for moving a module like std.algorithm to a package, it's cumbersome.
>
> Not really. Just move the files to another directory (i.e.
> std/internal/algorithm) and publicly import them.
>

std/internal isn't good. If I just want to import sort, I would have to 
do std.internal.algorithm.sort, which isn't good.

Plus, the package accessibility modifier would be broken with such a 
pattern.

The all.d, package.d, _.d, or, as I propose foldername.d (and submodules 
into foldername) do not break package accessibility modifier, which is 
better.


More information about the Digitalmars-d mailing list