News for hackers. Stuff that matters.
Re:Remove the ++ and –- operators by SilasX on Thursday December 03, 2015 @07:12PM (#10673734)
Well yes, they are different from addition, but that still doesn't justify a special symbol for a special case of addition.

When your "increment by 1" is really just in the service of iterating over a set, then the natural, obvious way should be to use a separate idiom that abstracts the concept of iteration over that set, rather than dive into the details of how you get access to the next member. Which is what Python does: "for x in ...".

If the loop is not simply iterating over the set, but tweaking some value unpredictably and periodically checking, then there's nothing special about += 1 relative to += 2.

There are no comments on this comment yet.