“Please Allocate This Integer”: The Polite Programming Language

We’ve been pretty rude to our computers. Take a look at the vocabulary of an average programming session: we kill processes, abort transactions, throw exceptions, execute instructions, and terminate threads that misbehave. We seize locks. We tell functions to return something, as if barking at a dog. Nobody ever says please. Nobody ever says thank you. And when something goes wrong, the machine doesn’t apologize — it crashes.

A satirical but surprisingly well-thought-out project called Bespoke — nicknamed The Queen’s Code — takes this observation and runs all the way with it. It’s a statically typed, nominally typed esolang (an “esoteric programming language,” built more to make a point than to ship production software) in which every single interaction with the compiler, the console, or another thread has to be phrased as a formal, courteous request. Source files even get their own extension: .charming.

It’s a joke. But like the best programming jokes — think Shakespeare-the-language or Rockstar — it’s a joke with real compiler-design thinking underneath it, and it says something genuinely interesting about how imperative, command-based syntax shapes the way we think about the systems we build.

The core idea: nothing happens without a proper request. In most languages, declaring a variable is a single blunt line: let ticketCount = 0;. In Bespoke, the same operation becomes a small letter of correspondence — addressed to the compiler, explaining the request, and closing with gratitude:

Dear Compiler,
Might you be willing to reserve a space for An Integer Number,
to be called ticketCount, beginning at the value 0?
Many thanks indeed.

Try to skip the pleasantries — say, by writing something as blunt as ticketCount = 5; — and the compiler refuses, flags the line as a “Blunt Imperative,” and asks you to rephrase your update as a civil inquiry instead. Mutating a value requires an apology, not a command.

Everything gets renamed, politely. Bespoke’s type system swaps out terse abbreviations for full, formal names. There’s no int, bool, or char — instead you get things like An Integer Number, A Truth Value, and An Individual Character. There are exactly two boolean literals, and they’re not true and false — they’re something closer to “Quite True” and “Patently False.” British spelling is enforced at the lexical level. Even control flow gets a makeover: an if statement stops being a command and becomes a hypothetical put before a metaphorical court — “should it please the court to consider whether…” The two branches are still fully deterministic; only the framing shifts, from “obey this rule” to “let’s consider this question together.”

Exceptions aren’t thrown. They’re regrettably raised. This is where the joke turns genuinely clever. Instead of a component “throwing” an exception at another component, which then has to “catch” it, Bespoke frames error handling as one part of the system humbly reporting an awkward predicament, and another part offering a compassionate reception. A try/catch/finally block becomes a “discreet attempt,” a “compassionate reception should the enterprise miscarry,” and a closing gesture to restore order regardless of outcome. It’s structurally identical to any try/catch block you’ve written a hundred times — but reading it forces you to notice how confrontational our usual error-handling vocabulary really is.

Concurrency, without the violence. A mutex isn’t “acquired” — it’s a request for exclusive audience with a shared resource, and you’re expected to “pledge to retire the moment your business concludes.” Deadlocks still happen (politeness doesn’t fix logic), but when two threads each defer to the other indefinitely, the runtime doesn’t call it a deadlock — it logs it as an “Exemplary Stalemate of Mutual Deference” and admires the threads’ good manners while the program hangs forever. And threads are never killed. They’re issued a formal invitation to retire, gently suggesting that “the hour grows late.” It’s cooperative cancellation, dressed for a dinner party.

Why this is more than a gag. It would be easy to file Bespoke away next to other joke languages — Shakespeare (code as a stage play), Rockstar (code as a power ballad), Chef (code as a recipe), LOLCODE (code as meme-speak). And it belongs in that lineage. But underneath the bit, Bespoke is doing real work that most esolangs do: using an absurd surface constraint to expose a real design assumption most of us never question. The assumption here is that terse, imperative, command-driven syntax is neutral — that kill -9, throw, and abort() are just words, carrying no weight. Bespoke’s entire premise is that they aren’t neutral at all. They shape a mental model in which the machine is a subordinate to be ordered around rather than a system to be reasoned with — and inverting that, even as a joke, makes the ordinary version suddenly visible again. It also happens to produce genuinely funny compiler diagnostics and crash reports, including a runtime that “resigns” via a sealed formal apology letter rather than panicking.

Should you try to use it? At the time of writing, Bespoke exists primarily as a concept and a very thorough specification — the reference implementation is still, fittingly, awaiting the compiler’s own gracious consideration. But even without a runnable compiler, Bespoke is worth reading end-to-end as a piece of language design satire. It’s the kind of thing worth sending to any developer who’s ever muttered “sorry” at their terminal after a bad rm -rf.

Note: The code snippets above are original illustrative examples written in the spirit of Bespoke’s documented style, not verbatim excerpts from the source article.

Suggested Reading