April 07, 2009 Re: The new, new phobos sneak preview | ||||
|---|---|---|---|---|
| ||||
dsimcha:
> Two things that had been discussed on this NG that I noticed are conspicuously absent: eager(), which converts a lazy range to an array,
eager() name is bad. Better array(), or toArray(), or something like that. More descriptive.
Bye,
bearophile
| ||||
April 07, 2009 Re: The new, new phobos sneak preview | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote:
> dsimcha:
>> Two things that had been discussed on this NG that I noticed are
>> conspicuously absent: eager(), which converts a lazy range to an
>> array,
>
> eager() name is bad. Better array(), or toArray(), or something like
> that. More descriptive.
At best this is a more general function that creates one range from another using a name of e.g. makeCopy.
auto a = makeCopy!(int[])(input);
auto b = makeCopy!(List!int)(input);
Andrei
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply