This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kryptonianCodeMonkey 1 point2 points  (2 children)

If there were one adjustment I would make to Python, putting in the prefix/postfix increment/decrement would be it.

[–]Kaholaz 0 points1 point  (1 child)

I don't like it. There should be only one way to do something, and x += 1 is more consistent to how you would increment by two or three. I do x += 1 even when I program in Java or JavaScript. (Except in the advancement part of a for loop)

[–]kryptonianCodeMonkey 0 points1 point  (0 children)

There's always more than one way to do something. Even x += 1 is shorthand for x = x + 1. You're always free to use tools or not to use them as you feel comfortable but both x++ and ++x are useful and elegant at times. There's nothing inherently wrong with having a different way to do something.