DIP16: Transparently substitute module with package

deadalnix deadalnix at gmail.com
Thu Apr 5 08:38:51 PDT 2012


Le 05/04/2012 17:23, Andrei Alexandrescu a écrit :
> On 4/5/12 7:43 AM, Steven Schveighoffer wrote:
>> I currently think DIP16 is invalid/worksforme (public imports allows
>> splitting a module into a package). All that is left is how we could
>> specifically import a package with one import statement.
>
> Not entirely (I was aware of the way public import works). An issue does
> exist - there are "too many names", i.e. the alias pulled in the
> importing module and also the name being imported. This makes for odd
> synonyms such as std.algorithm_package.sort.sort being the same as
> std.algorithm.sort. The other issue is that obviously algorithm_package
> and algorithm must have distinct names, which makes the scheme a bit
> awkward at least until we define a compelling convention. I guess we can
> live with all that.
>
> Andrei
>

The first one isn't a problem. It isn't too many names, it is 2 names, 
and it happen when explicitly told to do so.

The second is.


More information about the Digitalmars-d mailing list