'each' sounds like a good idea for supporting component programming a little more. As bearophile as already stated, you can do something like this...

someRange.filter!foo.frobulate.each!doSomethingWithIt;

For Walter's question about parallel execution, I imagine something like this.

// std.parallelism parallel function here.
someRange.whatever.parallel(numberOfUnits).each!doSomething

Basically it just removes a little foreach boilerplate. I don't think the implementation needs to be much more complicated than what Andrei wrote already, I would just pull that pretty much as-is.

I also don't think an argument like "you can already do this with foreach" is valid. You don't *have* to use it, and some people might like it. I know I would appreciate having it in std.algorithm. (I'm kind of a range fanboy.)

Reply via email to