• @[email protected]
    link
    fedilink
    291 year ago

    A useful tip I picked up was to use ii instead of j for an inner loop. It’s far more distinct than j.

    If for some terrible reason you have even more inner loops you can easily continue the trend i, ii, iii, iiii, iiiii - or iv, v if you’re feeling roman

    • @[email protected]
      link
      fedilink
      341 year ago

      If you have the need to nest 5 levels of for-loops, I suggest taking a step back and rethinking your approach, my friend.

      Even if that other approach is just refactoring it into separate methods.

      • @Gotoro
        link
        11 year ago

        Becomes unreadable if you’re using the iter values a lot

    • exu
      link
      fedilink
      21 year ago

      Two or three "i"s is readable, but any more and you’re counting.
      I’Ve started using i, k, m, n that’s usually enough.