On 11/21/2014 12:16 AM, Daniel Murphy wrote:
Over the years most of my unsigned-related bugs have been from screwing up
various loop conditions.  Thankfully D solves this perfectly with:

void fun(int[] a)
{
    foreach_reverse(i, 0...a.length)
    {
    }
}

So I never have to write those again.

I thought everyone hated foreach_reverse!

But, yeah, foreach and ranges+algorithms have virtually eliminated a large category of looping bugs.

Reply via email to