[Feature Request] Single name access when module name and content are same

Satoshi via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 25 09:13:07 PST 2015


On Friday, 25 December 2015 at 17:08:04 UTC, default0 wrote:
> On Friday, 25 December 2015 at 15:46:23 UTC, tcak wrote:
>> On Friday, 25 December 2015 at 15:45:16 UTC, tcak wrote:
>>> I only want to discuss an idea here. I am hoping see some 
>>> nice pros and cons from people.
>>>
>>> [...]
>>
>> My mistake at the end. It should be:
>>
>> my.big.lib.createFile("FSociety.dat");
>
> https://dlang.org/spec/module.html check the section on "Static 
> Imports" does this do what you want?


I think he want something like:

new System.Collections.List!int;
against
new System.Collections.List.List!int;

If you have
module System.Collections.List;

class List(T) { ... }


If the module and class names match, remove one.


More information about the Digitalmars-d mailing list