• @[email protected]
    link
    fedilink
    15
    edit-2
    1 year ago

    i for index or iteration. Using j, k, l… in loops signals (imho) that there is most likely an outer loop and the one using j, k, l are nested. x and y of course are carthesian coordinates . n is used as amount of substance in SI-unit-system, m is mass, maybe thats why it is used as amount of items in a set (Menge).

    Programming computers have started to solve mathematical problems and math already used these symbols for centuries(?), so why you should change them? They are well established even in simple school mathematics. And at the end of the day a computer is nothing more than a calculator.

    • Eager Eagle
      link
      English
      11 year ago

      why you should change them

      Readability and maintainability, mostly. They are one character long mostly to help handwriting compact formulas, but their pros end there. For software, though:

      “Programs are meant to be read by humans and only incidentally for computers to execute”

      • @Zeth0s
        link
        11 year ago

        For readability the loop has to be short, so it is not really a problem, and it is also clear the iterated variable.

        Long loops where the iterated variable is called far from the loop are anyway very bad for readability. There is a much worse problem in that code than i and j