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

Reply via email to