• @dragnucs@lemmy.ml
    link
    fedilink
    13 years ago

    While it is practical and works, it is not an operator by itself. It a combination of two, the unary decrementation and greater than comparator.

    Read it as i-- > value.

    • Ephera
      link
      fedilink
      03 years ago

      Honestly, I’m not sure which I think is worse. Having an explicit down-to operator or being able to combine operators in a way that confuses experienced programmers.

      • dinomug
        link
        fedilink
        0
        edit-2
        3 years ago

        This kind of combined operators are quite common in the competitive programming world, where the speed of coding is more important than readable.

        • Ephera
          link
          fedilink
          13 years ago

          Yeah, still horrid for real-world programming, though, where readability is ten times as important as how quickly you can type it out.

          • TmpodA
            link
            13 years ago

            I’d argue the problem here is more the unary (in/de)crement operator. It isn’t really necessary and most of the time it doesn’t make stuff more readable.