On 7/24/2012 10:10 AM, Russel Winder wrote:
I am wondering if the examples at
http://dlang.org/phobos/std_range.html#take need some attention. As far
as I can see they only work because the input is a list. If you take
from the result of an algorithm such as recurrence then you have to
explicitly create an array from the result of the take in order for the
[] operator to be defined.

I don't know about that specifically, but I've been trying to do some range based programs and have found that Phobos in general needs to be gone through and "range-ified".

Ranges are a huge deal for D, perhaps even a killer feature, and Phobos ought to be a showcase for them (like STL is for C++).

(Why a killer feature? Ranges make "snap together" component programming actually work in D.)



Reply via email to