DIP16: Transparently substitute module with package

deadalnix deadalnix at gmail.com
Fri Apr 6 10:52:31 PDT 2012


Le 06/04/2012 16:49, Andrei Alexandrescu a écrit :
> On 4/6/12 4:43 AM, deadalnix wrote:
>> Le 06/04/2012 01:32, Michel Fortin a écrit :
>>> On 2012-04-05 21:43:24 +0000, Andrei Alexandrescu
>>> <SeeWebsiteForEmail at erdani.org> said:
>>>
>>>> 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.
>>>
>>> I think it'd be valuable too. But how do you do that without creating
>>> ambiguous fully qualified names?
>>>
>>
>> It isn't possible. But as already mentioned, all name doesn't make sense
>> in all situation, so most of the time, disambiguation can be done.
>>
>> Plus, we want to be able to split module when they grow, and in such a
>> situation, collisions will never happen, because all symbols comes from
>> the same module in a first place.
>
> One other desirable feature is library distribution. Library writers
> should be able to offer library xyz as a sheer directory. Then library
> users should be able to import path.to.xyz and simply get going, or even
> rename xyz to xyz1 and import path.to.xyz1 without a problem.
>
> Andrei

Good point. That is an argument for package.d, all.d or _.d .


More information about the Digitalmars-d mailing list