DIP16: Transparently substitute module with package

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Apr 5 14:43:24 PDT 2012


On 4/5/12 4:26 PM, Steven Schveighoffer wrote:
> On Thu, 05 Apr 2012 17:00:56 -0400, Jonathan M Davis
> <jmdavisProg at gmx.com> wrote:
>
>> On Thursday, April 05, 2012 15:30:17 Steven Schveighoffer wrote:
>
>>> I don't see how. Just move the code into another module and publicly
>>> import that module from std/algorithm.d. Problem pretty much solved.
>>
>> The issue is code organization. If you want to split up std.algorithm (or
>> std.datetime or whatever) into multiple modules, you have to create a new
>> package with a completely different name with no connection to the
>> original
>> save for the fact that the original publicly imports it.
>
> My view is that people will not import the smaller modules, they will
> only ever import std.algorithm.

I think we should be looking for a solution that not only allows 
replacing module -> package transparently, but also allows people to 
import the newly introduced fine-grained modules.

Andrei



More information about the Digitalmars-d mailing list