DIP16: Transparently substitute module with package

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 5 11:33:22 PDT 2012


On Thursday, April 05, 2012 11:30:26 Steven Schveighoffer wrote:
> A couple issues that still need consideration:
> 
> 1. If std.algorithm the module becomes std.algorithm the package, what
> happens with ddoc? We probably *do* need a compiler solution to this.

That's assuming that you insist on keeping all of the documentation in one 
file. That arguably defeats the purpose of splitting up the modules. If there 
isn't enough in the module to split the documentation, then why do you need to 
split the module?

What _would_ be valuable and the package.d could provide is an overview of the 
package. The ddoc comment for the package.d module can become the 
documentation for the package as a whole.

> 2. deadalnix pointed out that if we come up with a scheme where the
> package module and its submodules are in the same directory, the package
> accessibility qualifier can be used (hey look, a use for the package
> keyword!).

Yes. std.datetime will need that once it's split. Without that, much of it 
can't be split and/or code would have to be needlessly duplicated.

- Jonathan M Davis


More information about the Digitalmars-d mailing list