Any chance to call Tango as Extended Standard Library
dsimcha
dsimcha at yahoo.com
Sun Jan 18 16:52:23 PST 2009
== Quote from Bill Baxter (wbaxter at gmail.com)'s article
> On Mon, Jan 19, 2009 at 9:16 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> 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
One point of clarification: opApply isn't going to be deprecated anytime soon, is
it? It seems like ranges still have a bunch of rough edges, and although I like
the idea in principle, I'm only willing to convert to ranges if I can define
iterable objects with the same level of syntactic sugar as opApply gives me. For
simple cases this is already true and I have begun converting some stuff.
However, for more complicated cases, opApply is still a lot more flexible.
More information about the Digitalmars-d
mailing list