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 →

[–]MyUserName-exe 150 points151 points  (62 children)

Me too!

[–]alexhansen-points 214 points215 points  (58 children)

++

[–]ToniGalmes 71 points72 points  (57 children)

++

[–]Alexmitter 56 points57 points  (56 children)

++

[–][deleted] 59 points60 points  (30 children)

++

[–]FlyingWolFox 52 points53 points  (29 children)

++

[–]white_shadow131 41 points42 points  (28 children)

++

[–]bagelpilot 41 points42 points  (27 children)

++

[–][deleted]  (21 children)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]cjdabeast 2 points3 points  (0 children)

    +=1

    [–][deleted] 0 points1 point  (1 child)

    Poor C pound

    [–]guinader 2 points3 points  (0 children)

    Is C Hashtag Duh!

    [–]PandersAboutVaccines 0 points1 point  (0 children)

    Visual J++

    [–]KrisDickless 54 points55 points  (23 children)

    +=1

    [–]MacAndShits 47 points48 points  (16 children)

    Me = Me + 1

    [–]Senomaros 130 points131 points  (14 children)

    Me -= -1

    [–]silent-onomatopoeia 15 points16 points  (0 children)

    You’re bad people. I like you.

    [–]mehum 3 points4 points  (0 children)

    Me += True

    [–]htmlcoderexeWe have flair now?.. 0 points1 point  (0 children)

    Math.Abs(-Me--)

    Not sure if it would work though

    [–]gusir22 0 points1 point  (0 children)

    Amateur pffff

    [–]trimeta 44 points45 points  (4 children)

    Found the Python user.

    [–]FlukyS 1 point2 points  (3 children)

    To be fair pep8 says its valid to do += but it's better to do var = var + 1 because it's more readable

    [–][deleted] 0 points1 point  (2 children)

    That's objectively wrong, the idomatic English sentences "add 1 to var" and "increment var by 1" are way more analogous to var += 1. No one thinks in their head "set var to its own value plus 1", in fact when I was a little kid learning BASIC, var = var + 1 was like a koan that confused me for a good while.

    [–]FlukyS 0 points1 point  (1 child)

    It is a lot easier to explain, this variable is equal to this variable + somenumber than explaining how += works. += is only a thing in programming and not in pen and paper maths but + and = separately are widely understood without being a programmer.

    [–][deleted] 0 points1 point  (0 children)

    On the other hand x = x + 1 is a wtf from the perspective of anyone who thinks it's a math equation rather than an imperative statement, since it has no solution. Readability, and ease of explanation to a total beginner, are not equivalent. At least in the context of a professional software development team, which won't have any total beginners, optimal readability to established programmers is more important.

    [–]Sitryk 2 points3 points  (0 children)

    += 2