Skip to content
DevMeme
103 of 7435
Syntactic Sugar: 'ifn't' We Had Better Keywords?
Languages Post #133, on Feb 15, 2019 in TG

Syntactic Sugar: 'ifn't' We Had Better Keywords?

Why is this Languages meme funny?

Level 1: The Word That Should Exist but Doesn't

In English we squish words together: "is not" becomes "isn't," "will not" becomes "won't." Computer code has a word, else, that means "otherwise, do this instead." The meme says: why use boring old else when we could squish "if not" into "ifn't" — a word that absolutely is not real but sounds like it should be? It's the same joy as a kid saying "I goed there" — wrong, but wrong in such a logical way that everyone understands it instantly. The guy in the picture rejects the correct word and proudly picks the made-up one, because the made-up one is simply more fun to say.

Level 2: What else Actually Does (and Why It's Fine)

The two words on trial are control flow — the machinery that decides which code runs:

if logged_in:
    show_dashboard()   # runs when the condition is True
else:
    show_login_page()  # runs when it's False

else is the "otherwise" branch. It has no condition of its own; it's defined purely as the opposite of the if above it. That's its quiet genius: the two branches are guaranteed mutually exclusive and exhaustive. You cannot mess up an else by editing its condition, because it doesn't have one.

The meme's ifn't would replace that guarantee with a second, independently written negated condition (if not logged_in). Early in your career you learn why that's a trap: the moment a condition exists in two places, refactoring will eventually update one and miss the other, and you'll spend an afternoon discovering that both branches can run, or neither. Some languages do offer an "if not" keyword — Ruby's unless is the famous one — and the standard advice you'll receive in your first code review using it is: fine for one-liners, never with an else, because unless ... else means "if not X, otherwise not-not X," and now everyone's lips are moving while they read.

So the meme's humor has a real engineering core: else is boring, ancient, and slightly awkward to read aloud — and it is also correct in a way its sassier alternatives struggle to be.

Level 3: Language Design by Shitpost

Two panels, two tokens. Drake recoils from else; Drake beams at ifn't. The proposal: replace the venerable else-branch with a contraction of "if not," styled like an English negative contraction (isn't, won't, ifn't). It is a joke, and like the best language-design jokes, it's about 30% less of a joke than it looks.

The first layer is grammatical absurdity applied to syntax. Programming-language keywords are frozen English — if, while, return — but they never absorbed English's morphology. You can't conjugate a keyword. ifn't violates that boundary, and the violation is funny precisely because every programmer's brain auto-parses it anyway: oh, it's the branch that runs when the condition is false. The apostrophe in an identifier is the cherry on top — in most mainstream languages, ' in a token is a syntax error waiting to happen (string delimiter, char literal), so ifn't would detonate the lexer before semantics ever got a vote. (Haskell programmers, who legally write foo' as an identifier, are the only ones not laughing nervously.)

The second layer is that ifn't essentially exists, and the meme reads as a sly jab at the languages that shipped it. Perl and Ruby have unless — literally "if not" as a keyword. Python spells it if not condition:. Shell scripting's if ! cmd is the same morpheme with worse ergonomics. And the industry's verdict on these is genuinely divided: most style guides allow unless for simple guards but ban unless/else, because a negated condition with an else-branch makes readers perform double negation in their heads — the exact cognitive bug this meme would standardize. Rejecting else entirely in favor of ifn't means every two-branch conditional now states its condition twice, once positively and once negated, which is how you get the immortal production pattern:

if (user.isValid) {
  proceed();
}
ifn't (user.isValid) {  // condition drifted from the one above in a refactor, 2021
  proceed();            // both branches now proceed. nobody knows why it works.
}

The third layer is sociological: this is a parody of the fake keyword proposal genre. Every language community has lived through earnest RFC threads proposing cute syntax — and the line between meme and merged feature is thinner than anyone admits. JavaScript's TC39 process has entertained stranger; Python got the walrus operator and lost a BDFL in the process. ifn't is what every syntax bikeshed looks like from outside.

Description

A classic two-panel 'Drakeposting' meme format with a bright yellow background. The top panel shows the musician Drake looking displeased, holding up a hand to reject the word 'else' written in black text on a white background. The bottom panel shows Drake smiling and pointing in approval at the word 'ifn't', also on a white background. The humor lies in the playful invention of a non-existent programming keyword, 'ifn't' (a portmanteau of 'if not'), as a preferred alternative to the standard 'else' statement. This meme satirizes the endless developer debates over syntactic sugar and the sometimes absurd quest for more 'readable' or 'clever' code constructs, resonating with experienced engineers who've seen countless language fads

Comments

8
Anonymous ★ Top Pick Proposing 'ifn't' is the linguistic equivalent of writing your own JavaScript framework in 2024. It's a bold statement, but everyone knows we're just going to stick with the devil we know
  1. Anonymous ★ Top Pick

    Proposing 'ifn't' is the linguistic equivalent of writing your own JavaScript framework in 2024. It's a bold statement, but everyone knows we're just going to stick with the devil we know

  2. Anonymous

    Why use “else” when you can bikeshed an RFC for “ifn’t,” ship a Babel plugin, and guarantee future code archaeologists a headache?

  3. Anonymous

    Waiting for the junior dev who proposes "ifn't" to discover they've just reinvented Perl's "unless" keyword, which we all collectively agreed to pretend never happened after the great readability wars of 2003

  4. Anonymous

    Somewhere a TC39 champion just felt a disturbance - 'ifn't' is one viral meme away from a Stage 0 proposal and a Babel plugin with 2M weekly downloads

  5. Anonymous

    Ah yes, the 'ifn't' pattern - because nothing says 'I've been doing this for 15 years' quite like religiously avoiding else blocks. We've all been in that code review where someone suggests 'just add an else' and you have to gently explain that we don't do that here - we fail fast, return early, and keep our cyclomatic complexity under control like civilized engineers. It's not about being pedantic; it's about the fact that when you're debugging production at 3 AM, you'll thank past-you for keeping the happy path at indent level zero instead of buried six levels deep in a nested conditional labyrinth

  6. Anonymous

    Veteran rule: ifn’t, return - every 'else' you delete cuts one nesting level, a few cyclomatic points, and at least one future 3am page

  7. Anonymous

    ifn't: the syntax sugar that'd halve pull request debates on nested conditionals, if only compilers agreed

  8. Anonymous

    Else is where bugs go to nest; ifn’t is the imaginary guard clause that slashes cyclomatic complexity and makes the linter file a grievance

Use J and K for navigation