ch-ch-changes

Steven Schveighoffer schveiguy at yahoo.com
Wed Jan 28 11:26:20 PST 2009


"Andrei Alexandrescu" wrote
> I've worked valiantly on defining the range infrastructure and making 
> std.algorithm work with it. I have to say that I'm even more pleased with 
> the result than I'd ever expected when I started. Ranges and concepts 
> really make for beautiful code, and I am sure pretty darn efficient too.
>
> There's a lot to sink one's teeth in, but unfortunately the code hinges on 
> a compiler fix that Walter was kind enough to send me privately. I did 
> document the work, but the documentation doesn't really make justice to 
> the extraordinary possibilities that lay ahead of us. Anyhow, here's a 
> sneak preview into the up-and-coming ranges and their algorithms.
>
> http://ssli.ee.washington.edu/~aalexand/d/web/phobos/std_range.html
> http://ssli.ee.washington.edu/~aalexand/d/web/phobos/std_algorithm.html

Andrei,

It looks like you've done a lot of good work here, it gives me even more 
incentive to try moving to D2 :)

Keep it up!

> Singly-linked list ranges are in, and to my soothing I found an answer to 
> the container/range dichotomy in the form of a topology policy. A range 
> may or may not be able to modify the topology of the data it's iterating 
> over; if it can, it's a free-standing range, much like built-in arrays 
> are. If it can't, it's a limited range tied to a container (of which I 
> defined none so far, but give me time) and it's only the container that 
> can mess with the topology in controlled ways. More on that later.

A very excellent idea!

-Steve 





More information about the Digitalmars-d mailing list