www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: The new, new phobos sneak preview

reply bearophile <bearophileHUGS lycos.com> writes:
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
Apr 07 2009
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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
Apr 07 2009