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 pr
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;
imp
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 new
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,
On Tue, 16 Jun 2015 11:45:22 +
Dennis Ritchie via Digitalmars-d-learn
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 std.math,
> std.conv,
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
wrote:
I just want to import individual features of these modules.
mixin template include(w...)
{
mixin _include!(w.length - 1, w);
}
mixin template _i
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
wrote:
I just want to import individual features of these modules.
mixin template include(w
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 exi
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
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...)
{
mixi
10 matches
Mail list logo