static import (v2.071.0)

Chris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 11 07:37:35 PDT 2016


On Wednesday, 11 May 2016 at 14:34:15 UTC, Edwin van Leeuwen 
wrote:
> On Wednesday, 11 May 2016 at 14:24:03 UTC, Chris wrote:
>> I was wondering if
>>
>> `static import std.file;`
>>
>> `if (exists(file))`
>>
>> will only import `std.file.exists` or the whole lot of 
>> `std.file`? I want to find out what the best strategy for 
>> imports is now.
>
> I tend to do specified imports, although (AFAIK) it doesn't 
> make a difference for the imported code:
>
> private import std.file : exists;
>
> if (exists(file))

Me too.



More information about the Digitalmars-d-learn mailing list