Re: static import (v2.071.0)

2016-05-12 Thread Chris via Digitalmars-d-learn
On Thursday, 12 May 2016 at 12:45:38 UTC, Steven Schveighoffer wrote: On 5/11/16 10:11 AM, Chris wrote: No. static import just defines what symbols are accessible in what contexts. The (likely) reason you are getting this is because you are importing a module with a selective import:

Re: static import (v2.071.0)

2016-05-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/11/16 10:11 AM, Chris wrote: I'm updating my code to 2.071.0 at the moment. Naturally, I get a lot of warnings like `module std.uni is not accessible here, perhaps add 'static import std.uni;'` Will `static import` bloat my exe or simply access the members I use? No. static import just

Re: static import (v2.071.0)

2016-05-11 Thread Chris via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:28:00 UTC, Vladimir Panteleev wrote: On Wednesday, 11 May 2016 at 14:26:37 UTC, Vladimir Panteleev wrote: To elaborate - this doesn't imply that the code of everything in that module will always be placed in the executable. The exact details depend on the

Re: static import (v2.071.0)

2016-05-11 Thread Daniel Kozak via Digitalmars-d-learn
Dne středa 11. května 2016 16:32:18 CEST, Chris via Digitalmars-d-learn napsal(a): On Wednesday, 11 May 2016 at 14:28:00 UTC, Vladimir Panteleev wrote: On Wednesday, 11 May 2016 at 14:26:37 UTC, Vladimir Panteleev wrote: ... Hm. What's the point then of using import std.string : strip;

Re: static import (v2.071.0)

2016-05-11 Thread Chris via Digitalmars-d-learn
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

Re: static import (v2.071.0)

2016-05-11 Thread Edwin van Leeuwen via Digitalmars-d-learn
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,

Re: static import (v2.071.0)

2016-05-11 Thread Chris via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:28:00 UTC, Vladimir Panteleev wrote: On Wednesday, 11 May 2016 at 14:26:37 UTC, Vladimir Panteleev 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

Re: static import (v2.071.0)

2016-05-11 Thread Vladimir Panteleev via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:26:37 UTC, Vladimir Panteleev 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

Re: static import (v2.071.0)

2016-05-11 Thread Vladimir Panteleev via Digitalmars-d-learn
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. Modules are always imported wholesale

Re: static import (v2.071.0)

2016-05-11 Thread Chris via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:18:16 UTC, Vladimir Panteleev wrote: On Wednesday, 11 May 2016 at 14:11:46 UTC, Chris wrote: I'm updating my code to 2.071.0 at the moment. Naturally, I get a lot of warnings like `module std.uni is not accessible here, perhaps add 'static import std.uni;'`

Re: static import (v2.071.0)

2016-05-11 Thread Vladimir Panteleev via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:11:46 UTC, Chris wrote: I'm updating my code to 2.071.0 at the moment. Naturally, I get a lot of warnings like `module std.uni is not accessible here, perhaps add 'static import std.uni;'` Will `static import` bloat my exe or simply access the members I