16

I'm always a little torn between writing

variable++;

Or

variable ++;

Comments
  • 6
    ++$i;

    I'll see myself out.
  • 4
    Always the first choice!!
  • 1
    inc cx
  • 14
    y = x++ + y;
    vs
    y = x ++ + y;
    vs
    y = x +++ y;
    vs
    y = x+++y;
  • 0
    @xalez WHY WOULD YOU DO THIS TO US DON'T GIVE THEM THIS IDEA

    Also ++ing you which, given your comment, is hilariously recursive.
  • 3
    @stisch I stopped myself from seeing how incrementing both variables and adding will look like (x +++++ y etc.) .. actually now I see why it's a good idea to give x++ and ++x precedence over addition 🤓 otherwise (x++ + y) != (x + ++y) .. thanks for the ++ anyways (regardless if it was a ++ or a++ 😏)!
  • 0
    @xalez thank you for giving me a reason to br proud to use `x++` and `++y`
  • 0
    Always first... Second is only, when there are two vars (eg. X++, but x + y)
  • 1
    @Netux most welcome, I had never considered adding a space before reading @AlgoRythm's question, so had to find good reason lest I stare into the abyss (which would obviously lead to it staring back at me 😰)
Add Comment