Quiddity, Haecceity, and the Singleton Class: A Medieval Scholastic Take on Object Oriented Programming in Ruby

Why is this thus? And what is the reason for this thusness?

— Artemus Ward, Moses, the Sassy

And if you gaze long into a navel, the navel also gazes into you.

— Friedrich Wilhelm Nietzsche, Beyond Good and Evil (paraphrase)


  • quid·di·ty (/ˈkwɪdɪti/; Latin: quidditas) n.: the particular qualities shared by all things within a category.
  • haec·cei·ty (/hɛkˈsiːɪti, hiːk-/; Latin: haecceitas) n.: the particular qualities which distinguish a thing from others within a category.

In the High Middle Ages, European medieval scholars recovered the Greek classics, thanks to their Muslim friends who had preserved the works of Aristotle, Plato, Euclid, and the rest. The Europeans took a very peculiar point of view on these works. They assumed the ancients had already figured out the universe. The only task remaining to them, the medieval scholars, was to figure out what the ancient writing meant.

They did this through arguing—either in person or through commentaries they handed down to one another through the years. This intellectual slap-fighting gets the fancy name of “dialectical reasoning.” They found a lot to argue about. Sometimes, the scholars would even invite the general public to ask questions in an ask-me-anything format they’d call quodlibetical questions. Making the ancient explanations of the world make sense in the face of both Christianity and how the world actually worked involved a lot of rhetoric.

This environment served as a fecund ground for lengthy discourses on how existence itself worked. The hard work of trying to reconcile all the things which medieval scholars required to be true about the world ended up being called scholasticism. I’m going to level with you here—most of it is of little relevance today. What, you never heard of such towering intellectual figures as William of Auvergne or Henry of Ghent?

You must’ve heard of Duns Scotus. He’s considered one of the “three great” philosophers of scholasticism, along with Thomas Aquinas (a guy you probably did hear about in school) and William of Ockham (a guy you probably remember from his razor commercials). Just in case you haven’t heard of Duns Scotus, a few pretty interesting ideas came out of this guy, like quiddity and haecceity.

He asked, what features of a thing made it belong to a category (quiddity)? What features of a thing distinguished it from other members in a category (haecceity)? This goes deeper than merely identifying what something is or telling apart two things.

Asking about a chair’s quiddity, for example, was akin to asking what features made it a chair at all. What changes could you make to a chair until it would no longer be a chair? (Do you recognize echoes of Platonism?) This is a little like a Ship of Theseus question: If I began to shave off one millimeter of a chair with a giant blade, with which cut does it cease to be a chair? What property did I break? What’s more, does the quiddity of chairs still exist even if I break every chair in the world? When the first chair was built, did that quiddity pop into existence then?

Haecceity, on the other hand, went beyond distinguishing among many objects. It was about identity itself. What made a thing one thing and not another? Why are you you and not someone else? Why do you remain you? What gave rise to plurality in the first place? This is to say, why is quiddity even distinct from haecceity? Why don’t we live in a universe where there is a single one of everything, where the idea of a thing is itself the singular instantiation of it?

And here, I’ve only considered a concrete object. In a pluralistic, materialistic universe, it’s trivial to think about individual instances of a category of thing—about something’s haecceity—until you start to apply it to abstract concepts, which aren’t material. What about colors? Can you have multiple individual instances of the concept of the color red? What does that mean? If there aren’t individual instances, does that mean that, out there, somewhere, is there some universal, singular instance of red? Do abstract ideas really exist in any real way in a materialistic universe due to the concept of haecceity?

Duns Scotus probably would’ve enjoyed programming languages, if only because they reify these questions as design decisions. I’m imagining him learning Common Lisp and discovering keyword symbols. What is the haecceity of an interned keyword symbol, like :ordnatio? There’s only one in the entire Lisp interpreter. It’s a unity of being.

Other things are universal in their being, too, within the interpreter, like packages and functions. Yet they have a real existence—a singular universal hosted within the interpreter forever (or at least until garbage collection). There are even abstract concepts which are built into Lisp itself—like the taxonomy of the empty list, or nil (the only false-like concept Lisp acknowledges), versus not-empty/not-nil/true (all the same when taken as an expression).

Since I’m certain you all know Common Lisp inside and out already, maybe looking at Ruby would be interesting. Scotus would probably notice first how Ruby “borrowed” keyword symbols as its own symbol feature. Same idea—once the symbol exists (a kind of Platonic ideal floating in the ethereal stack of the Ruby interpreter), it’s lodged there for good and reused whenever the same symbol is referenced. It’s a symbol the way the color “red” is a symbol for an idea in reality, a proxy for an abstraction.

Ruby is strenuously object-oriented, though. Object-oriented programming is thought to let programmers model the real world more easily. Scotus might have agreed. Classes map pretty well to quiddities; objects, to haecceities. Before object-oriented programming, most things lived singularly and eternally (except for, say, automatic or dynamic variables): functions, structures, literal values, and so on.

A quiddity can be described as a class, a conceptual proxy cookie-cutter from which individual objects can be instantiated. Haecceity is realized as an #object_id method which distinguishes each instance and helps Ruby keep track of which object is which in a durable way.

But haecceity can be more than just distinguishing things from one another or even maintaining identity. It includes the nature of things as individual. Many object-oriented programming languages include an idea that an object may take on a life of its own, but Ruby centers the object over the class in multiple ways.

You can create objects entirely without classes at all and imbue them with attributes and methods by calling Object#new.

scrooge = Object.new
def scrooge.lyric
  puts 'life is like a hurricane'
end
scrooge.lyric  # prints 'life is like a hurricane'

What is the quiddity of scrooge? It is something like an Object (a base class in Ruby), but it has taken on a new life, and it has a quality distinct from all other Objects. Does it still belong to the class of Object?

Ruby makes a distinction here which I think would make Duns Scotus look like Dunce Scotus. You’re welcome to ask Ruby what class that scrooge belongs to, using the #class method, and you’d get the answer of Object, but you can also ask for its #singleton_class, and you get something faintly different: #<Class:#<Object:0x00007f95017ed2e8>> (or similar). Ruby is communicating that scrooge has a singleton class which started as an Object but is now its own thing. Its quiddities have their own haecceities: the categories of things are not just immutable, singular universals but individuable concepts with pluralistic existences which you create at will anytime you instantiate an object. Ruby gives every object its own singleton class because it centers the object over the class, and in doing so, it acknowledges that each object has its own destiny which can be described as having its own qualities.

For what it’s worth, I am pretty sure that examining the idea of Ruby’s singleton class via medieval scholastic philosophy cannot be significantly more convoluted than any other explanation of the idea I’ve read online. Considering that I haven’t done any proofreading, research, or fact-checking, it’s bound to be at least fifty-percent correct, but you should check your local Ruby install for more information about singleton classes, Duns Scotus, or scholastic philosophy.

Five-minute Explainer: What Even Are Gravitational Waves?

You might follow the news—which you may find depressing these days—but maybe you don’t follow the science news, which is plenty exciting! Gravity is making waves these days, literally: gravitational waves. In fact, several weeks ago, the LIGO scientific collaboration announced the release of a catalog of gravitational wave sources.

Gravitational-wave detection began just a few short years ago, and only starting in 2017, scientists began to get the first really interesting observations. These most recent events have enabled us to understand fundamental physics better by ruling out or circumscribing a few grand theories of everything, and they have allowed us to see the universe in ways we never could before.

Yet the events themselves are mere “inspiral chirps” which happen in less than a second and usually at a remove of a billion parsecs or more. How can something so brief and so distant, be so meaningful? That’s what today’s explainer is all about.

To get the big deal about gravitational waves, let’s review what we know about gravity.

What Are Gravitational Waves?

Gravity happens because mass warps space and time. All mass does this, and the warping effect stretches out across the universe infinitely. Even you, as you sit reading this, cause a very tiny change in the space in your vicinity and in the passage of time, and that extends beyond you out into space forever, however faintly.

Two things are important to note, though. First, the degree to which any object warps space around it weakens very sharply as you move away from it. This is because the farther you get from it, the amount of space there is to warp grows exponentially, so the warpage falls off in turn. (This is a kind of conservation law, known as the inverse-square law.) Second, that warpage—that gravity—doesn’t travel instantly. It’s bound by the same speed limit as everything else, just as special relativity requires.

So given these facts, we know that gravity spreads out in much the same way light does. How does it form waves? Waves result from any cyclical phenomenon which traverses a distance. Think of a cork bobbing in a pond. The cork, stationary, merely moves up and down, but the ripples move out in waves. Waves made of gravity can therefore ripple outward anytime a source of mass changes in a repeating way.

This is what gravitational waves are—cyclical changes in gravity. The ones we can detect result from vastly large masses spiraling in toward one another extremely rapidly and colliding. Their circling motion causes the gravity from them to ripple out in a pattern of repetitive change—in waves—as the masses revolve around each other. This spiraling pattern causes the masses to alternate positions quickly, sometimes lining up or sometimes sitting side-by-side (from our point of view). As they revolve, they also draw closer and closer to one another. Finally, when the masses collide, the wave source stops in a sudden “inspiral chirp”—so called because the gravitational wave is so rapid and stops so suddenly, it sounds like a chirping sound when played as audio.

How Do We Detect Them?

We detect gravitational waves with a lasers, of course. Actually, it’s a bit more complicated. There are multiple lasers. And we bounce them down tunnels (called “arms”) over four kilometers long—long enough that the Earth curves downward by a meter over their length—and back.

When a gravitational wave ripples through a LIGO facility, the phenomenon literally causes those arms to change shape and size according to general relativity. The facility is a vast instrument called an interferometer which causes the lasers to interfere with one another in a very specific and measurable way.

The idea is that a pair of lasers are fired over a very great distance (through the arms) and bounced back to the detector, which is a specialized kind of digital camera. When they bounce back, they’re meant to interfere with each other in a very precise way because of how they overlap when they hit the detector. However, minute vibrations upset the delicate interference pattern, and the detector can see that.

The lasers have to be so long because they’re directly measuring very tiny warpages in the shape of spacetime itself. Gravitational waves ripple out from violent but brief, distant events, and so these instruments must be extraordinarily sensitive. LIGO reports that at its most sensitive, it can detect a change in distance ten-thousandth the width of a single proton. The facility in Hanford, Washington, detects vibrations so sensitive that it can pick up ocean waves crashing on the beach several hundred miles away.

Using multiple facilities located in different locations, it’s possible to detect gravitational waves very quickly using advanced, purpose-made software (used to separate the data from the noise) and roughly locate the source in the sky.

What Do We Do With This Information?

Gravitational-wave detection is one of the newest and most profound breakthroughs in recent observational cosmology. Even merely detecting a gravitational wave is a feat not to be understated—it signifies that we have directly measured a ripple in the fabric of spacetime itself and further cemented the theory of general relativity. It took nearly a century after their first theoretical prediction to achieve a direct detection.

Gravitational-wave astronomy gives us our first look at the universe beyond electromagnetic radiation (light, infrared, x-rays, and so on). We are finally able to see the ripples of the pond in which we all live, not just the specks of light. Gravity behaves differently than EM radiation in several important ways, so it promises new insights into massive phenomena like neutron stars, supermassive black holes, and the like—all at incredible distances difficult to observe otherwise. The promise of revelations into the formation of galaxies, exotic phenomena, dark matter, or even the creation of the universe all await.

Already, though, we’ve seen the birth of a new form of astronomy altogether called multi-messenger astronomy which combines both gravitational wave observations along with traditional radio or optical telescopic observations of the same event. Until now, humanity has only ever been able to see the light from the stars and make educated guesses about distance, mass, and so on. What’s more, we still have more questions than answers about how EM radiation and gravity relate to one another. The most fundamental explanations of all of creation, from the subatomic level to the cosmic level, depend on answers to these questions.

The first event observed via both gravity and light was called GW170817. Gravitational waves from this event was detected by three detector facilities in real time, and a corresponding gamma-ray burst (the most violent kind of explosion in the universe) was found at the same location in the sky by dozens of observatories. This event, which is thought to be two neutron stars colliding, has already taught us new things and begun to constrain models of fundamental physics.

For example, since it was observed via both light and gravity, we can compare the time it took for both to reach us and see what differences may exist. Some grand unifying theories of everything thought that perhaps gravity would take longer to cross the distance to us because it had to travel differently (through hidden, “compactified” spacetime dimensions, for example). Since that didn’t happen, those theoretical physicists will have to go back to the drawing board.

Gravity travels unattenuated by dust and unscattered over vast distances. Events like GW170817 travel over distances only affected by other masses, allowing us to “see” the universe in a different and maybe clearer way. Some scientists hope that we may even find primordial gravitational waves leftover from the earliest epochs of the universe, before even light could emerge because matter was too dense. Gravitational waves may let us pierce the wall of creation’s primordial fire and look beyond into nearly the very earliest moments of the universe itself.

What’s Next?

Gravitational-wave astronomy and multi-messenger astronomy are extraordinarily young sciences. The data from the events we’ve observed are still being pored over by scientists as they attempt to make or break new theories and find new signals in the noise.

In the future, we may be able to put extraordinarily large interferometers into space which extend over massive distances and which would not be subject to earthly vibrations such as trucks, oceans, footfalls, or earthquakes. One such planned project is called LISA. We would be able to observe many more sources of waves with such a detector, even ones within our own galaxy. Perhaps we will even find sources of gravitational waves we never even expected. We’re standing at the verge of a whole new universe.