Impressed

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jul 28 06:38:32 PDT 2012


On 7/27/12 6:38 PM, Dmitry Olshansky wrote:
> Then it's not in anyway better then ranges. You again maintain stack (or
> queue, whatever). The only difference is that for is replaced with a
> function front/popFront that do one iteration of the same state machine.

I'd say this argument on which is "better", yield or ranges, is a 
problem ill posed.

"yield" adds real, nontrivial value, and is not entirely implementable 
as a library. Walter and I saw some uses of it in C# at Lang.NEXT that 
were quite impressive.

On the other hand yield's charter is limited when compared to that of 
ranges. Yield goes with the very simple "go through everything once" 
functionality, which is essentially input ranges - only a tiny part of 
ranges can do.


Andrei


More information about the Digitalmars-d mailing list