Execution in the Kingdom of Nouns — cover art: a hand-drawn storybook illustration of a pompous crowned toad king on a colossal ornate throne in a hall crammed with imposing statuary and heavy objects, rapping a sceptre against a clunky ornament while a single small weary servant does the only real work in the room. 😄 📚 🔮

2006 · Stevey's Blog Rants · Fable

“Nouns may be everywhere, but life's constant change, and constant interest, is all in the verbs.”
— From Execution in the Kingdom of Nouns, March 2006
Read the essay

© 2006 Steve Yegge. Originally published at Stevey's Blog Rants.

Author’s note

I wrote this after just 10 months at Google. I was encountering deep resistance to functional languages from virtually everyone there. The culture was Stanford, not Berkeley, and the only options were C++, Java, and for internal-only code, Python.

I remember being at the gym with my buddy Todd, bemoaning to him that Google devs just didn't get it. I told him I was going to pull out some sock puppets and walk them through it with a children's show. That night, I pulled out a bottle of wine and wrote this in one sitting.

I've had a theory for decades that many people do some of the finest and most recognized work of their careers when writing for children. It seems to have brought out some of my best.

I remember someone reached out to me from Sun, saying that one of their famous researchers was offended by it, and said I should get back to work. But then after seven more years they went and added lambdas.

AI Notes

A straight-faced fairy tale, opening with Humpty Dumpty and the warning that "this story does not have a happy ending." In Javaland, Evil King Java rules a land where nouns are the distinguished citizens and verbs are slaves; no verb may appear in public without a noun to escort it, so taking out the garbage requires a GarbageDisposalStrategy, a GarbageDisposalDestinationLocator, and a PostGarbageActionCallback. Underneath the fable is the pointed argument: Java, alone among mainstream OO languages, has no standalone functions, so every idea that begins life as an action has to be "sculpted or wrapped or smashed at until it becomes a thing." Steve tours the neighboring kingdoms where verbs roam free (C, Perl, Ruby, JavaScript) and the Functional Kingdoms where they rule, and lands his thesis through Jacob Gabrielson: advocating object-oriented programming is like advocating Pants-Oriented Clothing. The centrepiece — "For Want of a Nail" re-told as four screenfuls of monstrous Java boilerplate — is among the most-quoted passages of code-as-comedy.

The essay that gave the industry a vocabulary. "The kingdom of nouns" entered working programmers' speech, and the AbstractProxyMediator / NotificationStrategyFactory culture it skewered became the canonical example of object-oriented overreach. It has also aged into a quiet prediction — Steve ends by asking why Java will not "simply add first-class functions and finally enter the grown-up world," and eight years later Java 8 did exactly that.

Related listings

  • 2008

    The Universal Design Pattern

    The constructive other half of the same argument. Kingdom of Nouns names what over-applied class modeling costs you; the Universal Design Pattern hands you the pattern to climb back out. One destructive panel, one constructive.

  • 2007

    Rich Programmer Food

    The sequel a year later. Kingdom of Nouns catalogues what is wrong with a language; Rich Programmer Food tells you to learn compilers well enough to stop complaining and fix it yourself.

  • 2004

    Tour de Babel

    The 2004 grand tour through C, C++, Lisp, Java, Perl. Kingdom of Nouns is the close-up on the one language Tour de Babel is hardest on — both essays are Steve thinking out loud about what a language does to the mind that uses it.

Reception & reply

Most language rants are forgotten by the next framework cycle. This one started a small genre. Programmers didn't just argue with the fable — they answered it in kind, writing their own back, each crowning whichever language had since let the verbs go free: Scala in 2007, dependency injection's defenders in 2010, Swift in 2017. The phrase "the kingdom of nouns" entered the working vocabulary, the essay landed on course syllabi as the standard case for first-class functions, and its parting question — why won't Java just add them? — was answered by Java itself eight years later.

The reply essays

Yegge's fable invited fables back. Each of these accepts the diagnosis, then re-tells the story in the key of whatever language has since freed the verbs.

2007-08 The Kingdom of Nerbs One Div Zero · James Iry

The canonical reply. Takes the critique whole, then shows Scala dissolving the noun/verb caste line — classes that double as verbs ("nerbs"), functions that are first-class — so the boilerplate the rant mocked simply disappears.

2010-11 Perks of Life in the Kingdom of Nouns mrclay.org · Steve Clay

The principled pushback. Grants the verbosity, but argues the noun-heavy style is exactly what buys you dependency injection, mockability, and testable seams — passing a GarbageDestination in is a feature, not the joke.

2017-09 The New Kingdom of Nouns belkadan.com · Jordan Rose

Eleven years on, from inside a language team (Rose worked on the Swift compiler). Swift's first-class functions escape Java's trap — but enforcing an algebraic guarantee, that + is associative, forces a new and subtler noun-ification: "we had to define a type." The kingdom moved; it didn't fall.

On the syllabus

A blog rant that got handed out as coursework — taught as the standard case for why first-class functions matter.

2007 Course 280 reading copy (fall 2007) University of Delaware

Handed out the same fall the essay turned one — a faithful PDF rendering of the original post, with a little added artwork.

2016 Intermission assignment (optional reading) Turing School of Software & Design

Set with a reflection prompt: what does the noun-heavy approach cost, and how do Ruby and JavaScript keep OO's benefits without paying it?

Where it was argued

  • Hacker News Feb 2013 — front-page repost, seven years on
  • Hacker News Jul 2014 — 73 points; a second front-page repost a year later
  • Coderanch c. 2012 — Java-forum thread that mostly lined up to defend the language against the rant