How to define an interator to provide array like behaviour in a class?

Jacob Carlborg doob at me.com
Tue Oct 16 23:14:45 PDT 2012


On 2012-10-17 00:23, Jonathan M Davis wrote:

> 2. Or make it a range (see http://dlang.org/statement.html#foreach_with_ranges
> and http://ddili.org/ders/d.en/ranges.html ), which would probably be a bad
> idea, since containers really shouldn't be ranges.

Why is that a bad idea?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list