Re: How to avoid multiple spelling `import`

2015-06-17 Thread Joy-Killer via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: mixin template include(w...) { mixin _include!(w.length - 1, w); } mixin template _include(long N, i...) { mixin(import ~ i[N] ~ ;); mixin _include!(N - 1, i); } mixin template _include(long N : 0, i...) {

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 16 Jun 2015 11:45:22 + Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Maybe not everyone needs these features. But, unfortunately, I often use a lot of imported modules. And use every time the word `import` very bad. version (none) { import

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: On Tue, 16 Jun 2015 11:45:22 + Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I just want to import individual features of these modules. mixin template include(w...) { mixin

Re: How to avoid multiple spelling `import`

2015-06-16 Thread tired_eyes via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote: On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: On Tue, 16 Jun 2015 11:45:22 + Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I just want to import individual features of these

Re: How to avoid multiple spelling `import`

2015-06-16 Thread tired_eyes via Digitalmars-d-learn
On Wednesday, 17 June 2015 at 01:56:45 UTC, flamencofantasy wrote: On Tuesday, 16 June 2015 at 16:40:39 UTC, tired_eyes wrote: On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote: On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: [...] Thanks. Maybe I'll use this code

Re: How to avoid multiple spelling `import`

2015-06-16 Thread flamencofantasy via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 16:40:39 UTC, tired_eyes wrote: On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote: On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: [...] Thanks. Maybe I'll use this code in your own programs. I still believe that this design deserves

How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, I can write this: import std.range : chain, split; But I can not write this: import std.range : chain, split, std.algorithm : map, each; We have several times to write the word `import`: import std.range : chain, split; import std.algorithm : map, each; Does D something to solve this

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Idan Arye via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 09:33:22 UTC, Dennis Ritchie wrote: Hi, I can write this: import std.range : chain, split; But I can not write this: import std.range : chain, split, std.algorithm : map, each; We have several times to write the word `import`: import std.range : chain, split;

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 11:16:32 UTC, Idan Arye wrote: There is no problem to be solved here. Having to type `import` for each imported module is not big enough a burden to justify this additional syntax. No, I think it is a holdover from C++-times — to write `import` for each

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
Maybe not everyone needs these features. But, unfortunately, I often use a lot of imported modules. And use every time the word `import` very bad. version (none) { import std.math, std.conv, std.stdio, std.ascii, std.range, std.array, std.regex,