Skip to content
DevMeme
3422 of 7435
The Noncrement Operator
Languages Post #3755, on Sep 28, 2021 in TG

The Noncrement Operator

Why is this Languages meme funny?

Level 1: Push And Pull

This is like putting a sticker on a door that says "push-pull" at the same time and then asking what kind of door action that is. It looks like it should mean something, because both words are real instructions. The joke is that combining them this way makes a ridiculous command, so programmers start inventing silly names for the nonsense.

Level 2: Two Operators Collide

The operator ++ usually means "add one." The operator -- usually means "subtract one." They can appear before or after a variable:

++i; // add one before using i
i--; // use i, then subtract one

The image combines them around the same variable: ++i--;. At first glance, a beginner might think it adds one and subtracts one, so nothing changes. That is the "noncrement" idea.

The problem is that programming languages have strict rules about how expressions are grouped and what kinds of values can be modified. A variable like i is a place in memory. But the result of i-- is more like a produced value, not the original place you can immediately modify again. So applying ++ to that result is not allowed for normal integer variables in C and C++.

This is why CompilerErrors and LanguageQuirks fit the meme. The symbols are valid individually, but the full expression is not a useful operation. It is the sort of thing that teaches new developers an important lesson: operators are not just decoration. Their position, precedence, and result type all matter.

Level 3: Preincremental Regret

The sticker shows a huge C-family-looking expression:

++i--;

The caption asks:

What would you call this operation? (Wrong answers only)

noncrement? Ex-crement?? Less-crement???

The joke starts with the fact that ++ and -- are real operators in languages like C, C++, Java, JavaScript, and C#. ++i means "increment i before using its value." i-- means "use i, then decrement it afterward." Put them together as ++i--; and the expression looks like it should perform some elegant net-zero integer ritual. It has the visual confidence of code and the semantic stability of a chair with no legs.

For ordinary C or C++ integers, this is not a clever way to add one and subtract one. It is invalid. Postfix decrement binds tightly, so the compiler effectively sees the inner operation as i-- and then tries to apply prefix increment to the result of that operation. But the result of built-in postfix decrement is not a modifiable storage location you can increment again; it is a temporary value. The compiler is not confused. It is offended in a very specific, standards-compliant way.

That is why SyntaxAbuse is the perfect tag. The expression abuses the surface grammar of familiar operators. It is built from pieces every C-family programmer recognizes, yet the combination crosses from "quirky" into "why are you like this?" The semicolon at the end makes it funnier because it presents the whole thing as a complete statement, as if someone actually intended to ship it.

The deeper developer humor is about readability and intent. Even if a language with overloaded operators could be coerced into making some version of this meaningful, the question becomes: meaningful to whom? Operator overloading can make domain code elegant when the operators match a natural model, like vectors or matrices. It can also create tiny hieroglyphics that require a compiler, a language lawyer, and a team retrospective to understand. There are easier ways to express "do nothing" than making the reviewer reconstruct value categories over lunch.

The "wrong answers only" prompt turns the compiler error into a naming contest. Noncrement captures the apparent net effect: increment and decrement cancel out. Ex-crement abuses the shared suffix with peak immaturity, which is exactly the appropriate level of dignity for ++i--;. Less-crement suggests decrement won the argument. None of these names need to be valid because the expression itself is already cosplay syntax.

Description

The image shows a small rounded rectangular sticker or card on fabric, filled with a soft purple-to-teal gradient. In large white symbols it displays the code-like expression "++i--;" with a semicolon at the end. The sibling metadata caption asks, "What would you call this operation? (Wrong answers only)" and suggests joke answers like "noncrement," "Ex-crement," and "Less-crement." The humor comes from combining prefix increment and postfix decrement syntax into an absurd C-family operator expression that looks meaningful but invites compiler and readability complaints.

Comments

54
Anonymous ★ Top Pick It is both pre- and post-regret: the compiler rejects it before code review gets the chance.
  1. Anonymous ★ Top Pick

    It is both pre- and post-regret: the compiler rejects it before code review gets the chance.

  2. @Eugene1319 4y

    экскремент, yeah

    1. @mrybs1 4y

      translate excrement

  3. @alueit 4y

    Bipolar-crement

  4. @yarmoliq 4y

    Crement

  5. @germanmetall 4y

    unconfidencremention

  6. @feskow 4y

    the pythonist's nightmare

  7. @funivandev 4y

    diversifier

  8. @RiedleroD 4y

    numeric ensurer (ensures that a variable is numeric, and if not, casts it to a numeric value)

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

      Also using it in a statement makes the number be 1 bigger and after its read out it will restore it

      1. @RiedleroD 4y

        bug report last seen: 24.11.2012

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

          😂😂😂😂

      2. @prirai 4y

        Why does your username look like a public GPG key?

        1. @sylfn 4y

          looks like simple password

  9. @chekoopa 4y

    peacock operator

  10. @esraghu 4y

    Use this when you have to write a statement without necessarily doing anything 😎

  11. @degreeby 4y

    Heisenberg-operator

  12. @sashakity 4y

    I'd call it i + 1

  13. @artur_odesa 4y

    Thread-unsafe NOPcrement

  14. @coconut_walter 4y

    Remaincrement

  15. @K3pp1 4y

    Placebo

  16. @Araalith 4y

    fapcrement

  17. @ItsTheShrimp 4y

    incrementde

  18. @MrZarei 4y

    what's the difference with just I then?

  19. @junkie_style 4y

    Fakerement

  20. Deleted Account 4y

    Crementcrement

  21. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    ReadIndexAsCountEment

  22. @fortrest 4y

    incremen't

  23. @a_desant 4y

    SegmentationFaultCrement

  24. @luckynikua 4y

    Wrong only? Is there a right one?

    1. @sylfn 4y

      right one: syntax error

  25. @azizhakberdiev 4y

    Reincremention

  26. @azizhakberdiev 4y

    Preinpostdecremention

  27. @azizhakberdiev 4y

    Incrementionbeforedecremention

  28. @azizhakberdiev 4y

    Preincrementopostdecremention?

  29. @azizhakberdiev 4y

    Surprisesuspiciouscremention

  30. @SamsonovAnton 4y

    WannaBeOneMore? WhatIfItWasBigger? WhatWouldTheNextNumberLookLike?

  31. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    Literally 99% of the commentors don't know that this is not doing nothing... int i = 1; print(i); print(++i--); print(i); Output: 1 2 1

    1. @azizhakberdiev 4y

      I told Preincrementopostdecremention

    2. @BotMike 4y

      > Wrong answers only

  32. @qtsmolcat 4y

    Bicrement

  33. @BotMike 4y

    nop

  34. @a742883 4y

    Trans non-binary addition

  35. @pace_e_calma 4y

    C(r/l)ement Michailescu

  36. @azizhakberdiev 4y

    Jackfrescrement

  37. @zherud 4y

    Its a mysterious way to write i+1. It's very good because it adds a veil of mystery to your code so noone can read it

  38. @sylfn 4y

    i think it is untranslatable, but idk Please use English as main language in this chat --- translate your message or mark as untranslatable

    1. @mxkrsv 4y

      Cuffcrement

  39. @BoxCollider2D 2y

    plusplusiminusminussemicolumn

  40. @callofvoid0 2y

    ++i--; side view of a person driving an army jeep without wheels

  41. @ColonelPhantom 2y

    That's just i+1 but harder to read

    1. @callofvoid0 2y

      nope the -- cancels it out

      1. @ColonelPhantom 2y

        The -- cancels it out AFTER returning the incremented value

  42. @im_ali_pj 2y

    jokecrement

Use J and K for navigation