Looks like I introduced it initially, sorry about that.

Michael, is there a plan to replace 'foreach' with range-based for loops?


I've thought about this and I don't know exactly how we would want to do it
as a community.
I've filed MESOS-3214 <https://issues.apache.org/jira/browse/MESOS-3214> with
listing 2 possible approaches.

Please share your thoughts and preferences there!

Thanks,

MPark.

On 4 August 2015 at 20:19, Artem Harutyunyan <[email protected]> wrote:

> We should also come up with the recommended way of dealing with
> foreachpair and foreachvalue occurrences. I did a quick grep and there
> seem to be over 900 places where foreach(value/pair) are used. It's
> going to be quite a change (albeit a straightforward one), but we
> should still be all for it :-).
>
> Cheers,
> Artem.
>
>
> On Tue, Aug 4, 2015 at 5:18 PM, Benjamin Mahler
> <[email protected]> wrote:
> > I noticed there was a single ranged-based for loop introduced in the
> source
> > tree:
> >
> >
> https://github.com/apache/mesos/blob/master/src/tests/resources_tests.cpp#L1004
> >
> > Since this is the only one in the codebase AFAICT, I've removed it to
> keep
> > our use of 'foreach' consistent. Michael, is there a plan to replace
> > 'foreach' with range-based for loops? Would just like there to be a
> > consistent way to loop over containers. :)
>

Reply via email to