Ranges of char and wchar

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Fri May 9 00:23:55 PDT 2014


On 08/05/14 23:33, Walter Bright wrote:

> It's true that when I first encountered C#'s LINQ, I was surprised that
> it was lazy.
>
> It's also true that most of std.algorithm is lazy. Apart from coming up
> with a new naming convention (and renaming algorithms in Phobos), I
> don't see any obvious solution to what's lazy and what's not.
>
> One possibility is to informally (i.e. in the documentation rather than
> the core language spec) call something an 'algorithm' if it is lazy and
> 'function' if it is eager.

Don't know if it helps, but we could add a UDA indicating which 
functions are lazy. This wouldn't require any renaming of existing 
functions.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list