• Pitri
    link
    101 year ago

    there is no reason for a (non-foreach) for loop to be any more or less finite than a while loop.

    for (a; b; c)
    {
      d;
    }
    

    is just syntactic sugar for

    {
      a;
      while (b)
      {
        d;
        c;
      }
    }
    

    in most or all languages with c-like syntax.