On Mon, Jan 19, 2009 at 9:16 AM, Andrei Alexandrescu
<[email protected]> wrote:

>> Unless it's a class you mean?
>
> Yah, ranges are meant to have value semantics. If you have a class container
> exposing ranges, define the range separately from the container itself:
>
> MyIterable collection;
> foreach (element; collection.all) {}
> foreach (element; collection.all) {}

Add .opRange so that's not necessary?  Or allow opApply to return a range?
Otherwise it looks like a step backwards.

--bb

Reply via email to