Skip to content
DevMeme
2246 of 7435
Programming Language 'Not Equal' Operators: A Comparative Mythology
Languages Post #2500, on Dec 22, 2020 in TG

Programming Language 'Not Equal' Operators: A Comparative Mythology

Why is this Languages meme funny?

Level 1: One Idea, Many Ways

Think of it like a group of friends from different countries all saying “not the same” in their own language. One friend firmly says it in Spanish, another in French, another in Japanese – they’re all expressing the same idea but with totally different words. In programming, it’s similar: the idea of “these two things are not equal” can be written differently depending on the programming language you’re using. This meme shows a bunch of cartoon dragon heads each representing a programming language, and each one has a different way of saying “not equal.” It’s funny because it’s like a chaotic classroom where every kid answers the question “what’s 2 not equal to 3?” but each shouts a different phrase or gibberish symbol! Most of the “kids” (languages like Java, Python, C, etc.) shout != (which we read as “not equal”), a few old-timers in the back like COBOL and SQL insist on saying <> (like they have a secret code), one silly kid (Lua) says ~= with a goofy grin, and then Ruby – instead of using a symbol at all – just uses the word “unless,” like it’s speaking in full sentences. The joke is that, even though all these languages are trying to say the same basic thing (these two values are different), they each have their own unique way to say it. It’s as if each dragon is speaking a different language to proclaim, “Nope, those two are not the same!” Anyone who has tried learning a couple of programming languages quickly discovers this and might find it a bit absurd and amusing. Just like how hello can be “hello,” “hola,” or “ni hao” depending on where you are, “not equal” in code can be !=, <>, ~=, or even the word unless – different symbols and words, same meaning. The meme makes us laugh at how something so simple can become unexpectedly confusing, and it reassures us that we’re not alone in thinking, “Why couldn’t they all just agree on one way?”

Level 2: Many Ways to Say "Not Equal"

Every programming language has to provide a way to check if two values are not equal, but they don’t all use the same symbols or keywords. This meme highlights the different syntax for the “not equal” operator (also called the inequality operator) in various languages, using the popular multi-headed dragon cartoon for visual humor. If you’re a newer developer, you might be most familiar with !=, read as “bang-equals” or “not equal to,” which is common in languages like C, Java, JavaScript, Python, Go, and R (those are the goofy dragon heads on the bottom row). For example, in Java or Python, you’d write if (a != b) to check that a is not equal to b. A lot of languages copy this style from C, where ! means NOT and == means equals, so naturally != means NOT equals.

However, not every language follows this convention. The top row of the meme has three more serious-looking dragon heads labeled COBOL, SQL, and BASIC – these are older languages (think 1960s-1970s era and legacy systems) that use the symbol <> to mean “not equal.” It literally looks like a less-than sign next to a greater-than sign. You can read <> as “less than or greater than,” which conceptually means “one value is either less or greater than the other, i.e., not equal.” For instance, in an SQL query you might write WHERE salary <> 50000 to find salaries not equal to 50000. In BASIC, you’d do IF X <> Y THEN ... to execute code when X is not equal to Y. Even though <> looks odd if you’re coming from C-style languages, it does the same job. These different symbols can be a source of confusion – if you switch between writing Python and writing SQL, you have to remember which “not equal” to use (!= vs <>). Many a junior dev has tried != in an SQL statement or <> in C code and gotten errors, simply because the syntax was wrong for that language.

The meme also shines a spotlight on Lua, a programming language (the dragon head with big goofy eyes and a tongue out 🐲). Lua’s “not equal” operator is ~=, which might look completely new to you. Lua chose ~ (tilde) followed by = for inequality. Why tilde? In some contexts, ~ can mean a logical NOT or bitwise NOT. In Lua, the keyword not is used for boolean NOT, but for comparing two values, Lua went with ~= to mean they’re not the same. If you haven’t coded in Lua before, just remember a ~= b is how you say a is not equal to b in that language. This is unique – among mainstream languages, Lua and MATLAB are a couple of the rare ones using ~=. So in the dragon meme, the Lua head is the one with ~=, and it’s drawn extra silly to emphasize that it’s the odd one out in that lineup of != dragons.

Finally, in the rightmost panel, we have Ruby represented by a green Velociraptor shouting “UNLESS”. Now, Ruby actually does have a != operator for not equal (just like most languages). But Ruby is being highlighted here for its unless keyword. unless is a Ruby control-flow keyword that is essentially the reverse of if. For example, in Ruby you can do:

unless x == y
  puts "x is not equal to y"
end

This does exactly what an if statement with != would do – it runs the code inside unless the condition x == y is true (in other words, it runs if x != y). Ruby developers often use unless because it can make code read more like natural English (it’s like saying “do this unless x equals y”). The meme is poking fun at Ruby by implying that, while other languages use symbols like != or <> or ~= to express “not equal,” Ruby sometimes prefers a whole word, unless, to handle negative conditions. It’s a quirky part of Ruby’s design aimed at improving readability. But if you’ve never seen it before, unless can catch you off guard — it’s like Ruby’s special way of saying “if not.” In the cartoon, Ruby standing apart with “UNLESS” lampoons how Ruby often does things its own way, different from the crowd.

All these differences are a classic example of LanguageQuirks and LanguageComparison. For a junior developer, it’s a lesson in paying attention to context: the inequality operator in one language isn’t guaranteed to be the same in another. It’s also a reminder that when learning a new language, even basic things like “not equal” might use different symbols or keywords. Here’s a quick cheat-sheet of the meme’s examples:

Language Not-Equal Syntax Example
COBOL <> (or even English words) IF AMOUNT <> 1000 ... (means amount is not 1000)
SQL <> SELECT * FROM sales WHERE region <> 'US';
BASIC <> IF score <> 10 THEN PRINT "Not ten"
Java/C/C++/C# != if (count != 0) { /* not equal */ }
JavaScript != (and !== for strict inequality) if (name != "Alice") { ... }
Python != (older Python2 also allowed <> but it’s gone now) if user_id != 42:
Go != if err != nil { /* not equal to nil */ }
R != if (x != y) { print("different") }
Lua ~= if answer ~= 42 then print("Not the answer!") end
Ruby != (operator) and unless (keyword) puts "Mismatch" unless x == y

Notice how the meaning is the same in each case – we’re checking two values and wanting to do something when they are not equal – but the way we write it varies. As a developer, you often have to remember these little differences. It’s almost like each programming language has its own accent or dialect, even for a simple “not equal” check. This meme resonates with developers because once you’ve been around a few languages, you’ve likely experienced the “wait, how do I write not-equals again in this language?” moment. It’s a lighthearted way to point out a real part of the Developer Experience (DX): every language has its own quirks, and part of becoming a polyglot programmer is learning to speak each one’s syntax correctly. The dragon meme format with multiple heads is perfect here because it visually represents a bunch of different “personalities” all related to one beast – in this case, the beast is the concept of inequality, and the heads are the languages each snarling their own syntax.

Level 3: Inequality Hydra

In the pantheon of programming languages, something as simple as “not equal” spawns a multi-headed beast of syntax. Seasoned polyglot developers immediately recognize this hydra of inequality operators and chuckle (or cringe) at how each dragon-head… err, language, hisses a different “not equal” sound. The meme shows three fierce, old-school dragon heads labeled COBOL, SQL, and BASIC brandishing the symbol <> (angle brackets) for “not equal”, while a row of younger, goofier dragon heads—Java, JavaScript, C, Python, Go, R—all stick out != (bang-equals) as their battle cry. But one head (the Lua dragon with a derpy face) goes ~= (tilde-equals), totally unique in the crowd. And then, off to the side, a Ruby velociraptor (apparently Ruby didn’t want to be a dragon at all) smugly flaunts the word UNLESS instead of any symbol. This comedic juxtaposition pokes fun at how the same basic operation—inequality—is expressed with a bewildering variety of syntax across languages. It’s highlighting a classic LanguageQuirks scenario: if you’re a developer hopping between projects, you might feel like each language is speaking a different dialect of “not equal,” and you have to mentally switch gears to avoid summoning syntax errors or, worse, subtle bugs.

Why is this funny to an experienced dev? Because we’ve all been bitten by it. 😅 Imagine debugging why a SQL query isn’t returning results, only to realize you instinctively wrote != instead of the SQL-standard <>. The database stares back blankly as if to say “I have no idea what != means.” In the trenches of enterprise code (where COBOL might still lurk), <> reigns supreme as the inequality operator, a legacy carried from mathematics and early language conventions. Meanwhile, the C lineage (C, C++, Java, JavaScript, etc.) popularized ! as the logical NOT operator, so != naturally became “not equal”. This LanguageComparison shows how historical lineage dictates syntax: C’s descendants all mimic its operators, leading to a whole family of languages unified under the != banner. It’s a bit of an inside joke among senior devs that most modern languages agree on != – it’s the one thing Java, JavaScript, Python, and even Go (despite being relatively new) actually agree on. That’s why in the meme they form a goofy seven-headed dragon sharing the != symbol above each head – a rare moment of harmony in the LanguageWars!

But of course, there’s always that one oddball in the family photo. Lua’s use of ~= for not-equal makes it the derpy dragon head – it sticks out its tongue with ~= while everyone else says !=. 🐉 The symbol ~ (tilde) has a history: in logic and math, ~ often denotes negation (e.g., “~P” means NOT P). Lua (and its cousin in spirit, MATLAB) chose ~= perhaps to keep consistency with using ~ as a NOT operator (Lua uses the word not for boolean negation but adopted ~= for inequality). To a seasoned dev, ~= screams “Lua was feeling special when it designed its syntax.” It’s a benign quirk, but it can trip you up if you hop into Lua after writing Python all day – you might reflexively type != and get a faceful of errors because Lua’s parser thinks you wrote ! (which it doesn’t use) and gets very confused. These little differences are the bane of a DeveloperExperience_DX when juggling multiple languages: the cognitive load is real. The meme’s humor comes from the shared pain: every experienced coder remembers that one time they wrote the wrong not-equal operator in the wrong language and wondered why everything broke. It’s a rite of passage in DeveloperHumor.

And then there’s Ruby, the raptor with the “UNLESS” sign. Ruby’s case is hilarious because it doesn’t introduce a funky symbol for inequality – it actually supports != like others for comparisons – but Rubyists love using the unless keyword for control flow. unless is basically Ruby’s way of saying “if NOT (something) then…”. In Ruby (and also Perl, which inspired it), you can write: unless is_raining { wear_sunglasses }, which is the inverse of if !is_raining. The meme playfully depicts Ruby as not even part of the multi-headed dragon squad, but a totally separate creature proudly brandishing a word instead of an operator. To veteran devs, this calls to mind Ruby’s penchant for readability and expressiveness – Matz (Ruby’s creator) wanted the language to read like English. So Ruby gave us a built-in negated condition keyword to avoid the dreaded double negatives (no more if !(x == y), you can do unless x == y). Some of us find that elegant; others find it unnecessary a bit confusing at first. The meme exaggerates it by implying Ruby says “UNLESS!” instead of using a symbol for not-equal, poking fun at how Ruby sometimes just does its own thing. It’s like Ruby’s off in its own Jurassic Park, separate from the dragon fight, saying “Unless” with a clever smirk. For the seasoned dev, it’s a nod to all those subtle language idiosyncrasies we carry in our heads. We laugh because it’s true: something as fundamental as “these two values are not the same” has N different representations across languages, and forgetting which one to use can instantly hatch a bug or a confusing error. In an ideal world, maybe all languages would agree on one way to express != (heck, maybe we’d use the actual ≠ symbol everywhere). But the reality is a fragmented landscape – a Babel of code where each tongue has its own twist. The meme captures that perfectly with the dragon imagery: many heads, many voices, one big chaotic beast that every experienced dev has to tame.

Description

A multi-panel meme using dragon imagery to compare 'not equal' operators across various programming languages. The top panel shows three traditional dragon heads for COBOL, SQL, and BASIC with the '<>' operator. The main bottom panel features the formidable three-headed dragon King Ghidorah, with each head representing a modern language (Java, JavaScript, C, Python, Swift, R) that uses the standard '!=' operator. In stark contrast, one head of the dragon is the goofy 'Kevin' dragon, representing Lua and its '~=' operator. A final, separate panel shows a silly green dragon for Ruby, with the keyword 'unless' as its unique way of expressing inequality, highlighting its distinctive syntax. The meme humorously critiques the lack of standardization for a fundamental operation and celebrates the quirks of different languages, a sentiment deeply familiar to senior developers who have worked with multiple languages over their careers

Comments

7
Anonymous ★ Top Pick The '!=' operator is standard, '<>' is a fossil, '~=' is a curiosity, and Ruby's 'unless' is just syntactic sugar for 'if you're not one of us'
  1. Anonymous ★ Top Pick

    The '!=' operator is standard, '<>' is a fossil, '~=' is a curiosity, and Ruby's 'unless' is just syntactic sugar for 'if you're not one of us'

  2. Anonymous

    After 20 years of polyglot coding, I still type “<>” in Python, “!=” in SQL, and mutter “unless” in Java reviews - turns out my muscle memory implements eventual consistency

  3. Anonymous

    The junior dev proudly announces they've containerized the legacy COBOL system, unaware that somewhere a mainframe just achieved sentience out of pure spite

  4. Anonymous

    The real insight here is that while we mock COBOL as ancient, it's depicted as the most ornate and powerful dragon - because let's be honest, it's still running half the world's financial systems while we're busy rewriting the same CRUD app in the framework-of-the-month. Meanwhile, Ruby gets the dinosaur treatment for having 'unless', but any Rubyist knows that's just Matz being considerate of how humans actually think. The golden dragons representing modern languages? That's the uncomfortable truth that despite our tribal wars, most mainstream languages have converged on remarkably similar syntax and semantics - we're basically arguing over which shade of gold our dragon should be

  5. Anonymous

    In a polyglot stack, even 'not equal' isn't equal: <> for COBOL/SQL/BASIC, ~= for Lua, JS demands !==, Ruby says 'unless', and SQL's NULL turns the whole debate into 'UNKNOWN'

  6. Anonymous

    Modern languages swarm like microservices; COBOL just sits there, unkillable, compiling your retirement plan

  7. Anonymous

    In a polyglot monorepo, '!=' is just an interface - SQL implements '<>', Lua ships '~=', and Ruby bikesheds the API with 'unless'

Use J and K for navigation