Programming Non-Definitions
If you hang around functional programming circles enough, you will inevitably see someone asking about this weird mathematical construct called a “monad,” which someone else will then helpfully define as:
just a monoid in the category of endofunctors
Of course, it follows trivially from this definition that… No, just kidding, this definition is completely useless. Its only actual value is as a meme, because anyone who could understand it doesn’t need it.
If you do understand this definition[1] though, it’s pretty funny how useless it is. Here’s a more accessible one about parallel programming, taken from a Primeagen video:
A mutex is just a semaphore of length 1.[2]
When I heard that, I realized this kind of non-definition is actually an entire category of joke, and I got a terrible idea. This terrible idea also involved absolutely killing the joke by putting its humorous contrast into enough words to explain it to Claude. It’s not quite a circular definition, but explaining a useful special case in terms of a much more advanced generalization is juuuust close enough to a logic error to be amusing.
All this to say: although I don’t think LLMs 10× my programming productivity, they can definitely 10× my ability to produce ragebait. I asked Claude 4 to come up with some new definitions in the same spirit as these two, and they’re too terrible not to share.
- An array is just a hash table where the hash function is the identity function
- A stack is just a deque with one end welded shut
- A variable is just a database with exactly one row and one column
- A for loop is just a tail-recursive function with compiler-applied optimization
- An if statement is just a pattern match with two cases
- A function call is just a single-step reduction in the lambda calculus
- A boolean is just an enum with cardinality 2
- Addition is just repeated application of the successor function
- A linked list is just a tree where every node has at most one child
- A string is just a list of characters, which is just a tree with maximum branching factor 1
- Assignment is just a state monad operation in the IO context
- A constant is just a function that ignores its arguments
- A goto is just a continuation with explicit control transfer
- Inheritance is just composition with automatic delegation
- A while loop is just a fixed-point combinator with a predicate guard
Sure, a lot of these are less accurate than the first two, but are you going to read “a boolean is just an enum with cardinality 2” and tell me with a straight face that LLMs don’t understand programming?
I mean, yes, of course, because this is just shuffling definitions around and proves nothing, but I thought it was fun.
Not that I do anymore—I haven’t dusted off my Haskell compiler in years, and I never did more than leaf through my copy of Categories for the Working Mathematician. ↩︎
The helpful version: a mutex (more commonly called a lock) is a flag that only allows one thread at a time to enter a critical section of code. A semaphore is a counter of how many units of some resource are available. So if the maximum number is one, you have a “binary semaphore,” which can be used as a lock. ↩︎