Natural Languages vs. Programming Languages: Same Word, Different Worlds
We call them both “languages” – but does a for loop have anything in common with a love poem? Turns out, yes and no. And the differences are way more interesting than you might think.
The Reason We Have Languages (Either Kind)
Languages exist to pass information around. Human languages gave us tribes, then kingdoms, then sci-fi novels about interstellar travel – written centuries before anyone ever left Earth. That’s flexibility.
Computers, on the other hand, speak machine code: raw numbers and arithmetic operations. BB 11 01 means something to a CPU, but to a human? It’s a headache. So in the late 1950s, we invented programming languages – a human-readable middle layer that gets translated into machine code. That’s why you can write if user.is_active: instead of pushing hex bytes around.
How Human Languages Lie (and Why Code Doesn’t)
Russian says “dождь идёт” – “the rain walks”. English says “it rains” – “it rain-verbs”. French says “il pleut”. None of them are true: there’s no walker, no “it”, just water falling from the sky. Human languages force reality into their own grammar.
Machine code has zero such illusions. It’s brutally literal: take this number, add that number, put the result there. No metaphors, no actors, no walking rain.
Low‑Level vs High‑Level – It’s Not a Class Thing
“Low‑level” languages (like assembly) stay close to the machine – you tell the CPU every tiny step. “High‑level” languages (Python, JavaScript) let you say “make it pretty, I don’t care how”. The naming reflects our narcissism: humans at the top, computers at the bottom.
The Real Killer Difference: Narration vs Commands
What do we do most with natural language? We tell stories.
I woke up dressed in an armchair,
In my own flat among familiar walls…
Now try to write that in C. All you get are assertions: I_am = dressed; I_am = awake; my_location = armchair; Clunky, right? Programming languages are built almost entirely for the imperative mood – do this, go there, set that. They’re instruction manuals, not novels.
Want to talk about the past? Good luck. Natural languages handle tense effortlessly. In code, the past doesn’t matter unless you explicitly store it. And concepts like “spiritual thirst” (Pushkin’s famous line) can’t be mapped to a variable – thirst = 0 is just an empty box, not a longing.
But People Still Write Poetry in Code
Yes, really. There are esoteric languages like Shakespeare, where the source code looks like a Renaissance play. And people have written poems in Python and JavaScript – some for everyone, some for the elite few. The results are awkward, fascinating, and beautifully absurd.
Bottom Line
Both language families have words and grammar. But natural grammars are universal – they can describe anything from a rainy street to a broken heart. Programming grammars are narrow, laser‑focused on giving commands. One tells stories, the other gives orders. And that’s why you can’t import a soul.
Top comments (0)