Philosophy of object-orientation

From there the link to the paper requires a login, but it’s also available at the ACM digital library.

It’s heavily steeped in object-orientation of the Java and C++ style, that I question the entire foundation and ontology it’s based on. Not to discredit the work in any way, I mean I’d prefer to build from different first principles. One of the assumptions is the fundamental distinction between objects and values, supported by cited references including:

This gets closer to the heart of what we’ve been discussing so far in this thread: what is the value and cost of object-orientation; whether it is a necessary and useful abstraction, or more of a hindrance and incidental complexity inherited from history; how there may be advantages in deconstructing objects, and instead work with the primitives of values and processes directly without the notion of a mutable state and “identity” (self or this).

Values amount to timeless abstractions for which the concepts of updating, sharing and instantiation have no meaning.

Objects exist in time and, hence, can be created, destroyed, copied, shared and updated.

We can see now an important difference between the domain of mathematics and the domain of computer science.

Mathematics deals with things such as numbers, functions, vectors, groups, etc. These are all abstractions, i.e., values. It has been said that the theorems of mathematics are timeless and this is literally true. Since mathematics deals with the relations among values and since values are atemporal, the resulting relations (which are themselves abstractions and values) are atemporal.

Conversely, much of computer science deals with objects and with the way they change in time. State is a central idea. It might not be unreasonable to call computer science objectified mathematics, or object-oriented mathematics.

  • Programming is object-oriented mathematics.
  • Mathematics is value-oriented programming.

In the context of my recent study, this is directly related to:

The Curry-Howard-Lambek correspondance is a three way isomorphism between types in programming languages, propositions in logic, and objects of a Cartesian closed category.

Here the term “object” has a completely different meaning. (Even the term “term” has a domain-specific meaning.) This is about the structure and relations of mathematical objects.

A category has objects and morphisms, which represent things and ways to go between things.

In physics, the objects are often physical systems, and the morphisms are processes turning a state of one physical system into a state of another system—perhaps the same one. In quantum physics we often formalize this by taking Hilbert spaces as objects, and linear operators as morphisms.

A linear type theory can be seen as a programming language suitable for both classical and quantum computation. This language differs from the typed lambda calculus in that it forbids duplication and deletion of data except when expressly permitted.

To impose these restrictions, linear type theories treat variables very differently than the typed lambda calculus. In fact, in a linear type theory, any term will contain a given variable at most once. But linear type theories depart even more dramatically from the typed lambda calculus in another way. They make no use of lambda abstraction! Instead, they use “combinators”.

Physics, Topology, Logic and Computation: A Rosetta Stone

Well, I tried to bring the discussion back to the topic of object-orientation but still ended up with combinatory logic. A reason is that combinators are a kind of immutable primitives at a lower layer of abstraction, closer to the metal in the domain of mathematics. Object-orientation is, dare I say, an arbitrary abstraction that can be shaped any way you want: one can build such ephemeral “objects” and metaphysical architectures with combinatory or other kinds of logic, but not the other way around.

1 Like

Conal is one of the people whose ideas have greatly influenced me.

The main idea that you should take from him is denotational programming. In simple terms, you relate specific computations to a specific model that has meaning to the programmer.

You should look at functional réactive programming from this perspective.

@neauoire 's Tote could be seen as having a bag of things and having reactions inside this bag, if the rules were executed out of order.

You should look at his critic of Haskell’s IO monad, for the same reason, that it has no denotational meaning.

It is for the above reasons that I am talking about a modeling language, because then we can replace the IO monad with something that has meaning to the programmer / user.

(More forthcoming when I get some time free)

Edit : John Baez’s paper is really interesting. I will look at it.

1 Like

Computing with space” is an expression I saw while reading about diagrammatic reasoning and visual thinking.

Tote is a kind of computing environment whose interface is a bag of unordered “objects” and a few rewrite rules. Like an abacus of symbols that a child can understand and learn to use. When I was writing about Haskell and Rust earlier, I edited out this aside:

But personally all these languages are way too big for my taste. I want like a handful of pebbles, or magic beans, that I can cast on the ground and conjure up a computational universe. Maybe that’s too much to ask.

What attracts me to lambda calculus and combinatory logic is that they show how a handful of small immutable primitives can be composed, as building blocks of logic (Bausteine der mathematischen Logik), to create a language capable of performing any computation. And maybe even bootstrap a practical software stack and environment.


I find the Curry-Howard-Lambek correspondence as profound as Maxwell’s equations that unified our understanding of electricity, magnetism, light, space and time. Some call it a computational trinity, because there’s a beauty in the relations that unify concepts and phenomena in these domains.

Theoretical physicist Murray Gell-Mann talks about in Beauty and Truth in Physics, how the elegance of a theory is a successful criteria in its being true.

To contrast, Benoit Mandelbrot’s The Fractal Geometry of Nature was intellectually innovative in taking seriously experimental mathematics that were initially considered ugly and “monstrous”. In that book Mandelbrot shows how mathematics can be an experimental science, using the computer as an instrument to explore mathematical worlds.

Mathematics is not a deductive science – that’s a cliché. When you try to prove a theorem, you don’t just list the hypotheses, and then start to reason. What you do is trial and error, experimentation, guesswork. You want to find out what the facts are, and what you do is in that respect similar to what a laboratory technician does. – Paul Halmos

I quoted earlier the physicist Frank Wilczek, about Galileo’s approach.

..He measured how fast balls roll down inclined planes. How mundane! But the learned discourses, while grand, were vague. Galileo’s investigations were clear and precise. The old metaphysics never progressed, while Galileo’s work bore abundant fruit. He too cared about the big questions, but he realized that getting genuine answers requires patience and humility before the facts.

It’s advocating for science and philosophy to be grounded in empirical research (“gaining knowledge from observation and experience”) and the experimental method. The word “mundane” is from the Latin mundus (“the world”), physical reality (the body) as opposed to the sphere of ideas (the mind or spirit). The same with music and living language: the phenomenon is the primal fact. Music theory and linguistics are descriptive models, not prescriptive rules of how things must be.

From there I can critique my mathematical mysticism, to question my “entire foundation and ontology”. Correctness and logical proofs are not always the priority, or even matter at all in some contexts. When building a machine, it must be as correct and predictable as possible despite the messiness and imperfection of the material world. When composing music, what does it mean for a piece of music to be correct? The only criteria for the truth in music is the human experience.

Finished reading Values and objects in programming languages (1982), continuing after where I stopped. (“Programming is object-oriented mathematics. Mathematics is value-oriented programming.”) It persuaded me that mathematics, while being a necessary foundation, is not sufficient abstraction for a computational medium (language or software as tool for thought) that aims to represent/express/support how a person thinks, experiences, and models “the material world, which contains things that exist in time”. The medium must adapt to the person.

The charm of Tote is that it’s a little game world, like chess or Go, made up of conceptual objects and rules to transition between world states. Applying rewrite rules is equivalent to the process of evaluating a program (or “reducing” an expression) step by step. It shows that numbers and operators, values and functions are not necessary for performing computation. How weird! It points to “computing with space” and thinking with images or sounds. Like two people drawing lines on the sand with a stick, placing rocks and moving them, as they discuss and develop a strategy.

I still want to see mathematics as the hardware on which the software of physics and biology runs. But deeper, what we’re actually working with when we work with mathematical or physical objects, is our own mind. Not in the sense of Plato’s theory of forms, the heart/mind-only school of Buddhism (cittamātra), or the prima materia of alchemy; but as a practical reality, we don’t live in the objective world, we live in a subjective experience and interpretation of it as a story - no matter how illusory, illogical or even wrong.

So a tool for thinking would not be complete if it didn’t allow for possibly incorrect, contradictory, vague or messy trains of thought. On the other hand, some contexts require thoughts to be structured, verified as true and correct, expressed clearly and precisely as possible. I’d rather live with islands of uncertainy in the ocean of truth.


These I consider works of art in the field of applied mathematics.

Like Tote, they’re sometimes seen as mere curiosity, as a coding challenge of how small or unusual a language can be. But there’s more to it, even a profound depth they’re pointing at, about the nature of computation and maybe the mind itself.


Empirical research means performing experiments, testing hypotheses, making observations, producing artifacts. It’s where theory meets reality, and reality suggests theory.

I wonder, would it be helpful to have a collaborative space for writing and running programs?

Like play.malleable.systems for code snippets, sketches, prototypes to demonstrate ideas. Might be nice to have a single place where people can see and show malleable systems and ideas in action, for example, a running instance of HyperDoc, FreeWheeling apps, Uxn programs, Cardumem wiki, Lopecode, Decker, etc. It could be a Git repository with anything that can run as a standalone static HTML page.

3 Likes

I’d love to see the forum’s Catalog grow into something like that, there’s a bunch of stuff now, but often no playground, no interactive demos or videos.

I very much enjoy reading your recent explorations into linear logic, spacial computing, it reads like you’ve gone out into the deep end, and you’ve written some amazing stuff along the way, I’ve liked each post, but I just meant to say out loud what I’ve been thinking all along, is that it looks like you’re narrowing down onto a theory of computation that really resonates with me.

Tote was meant to demonstrate that FRACTRAN, with a nice interactive front-end, is a powerful medium for computation, and you’ve understood it.

I’ve been in a similar place for a while and I’ve wanted a kind of playground to explore this category of spacial computing with space that went beyond the capabilities of Tote, and so I made this playground and notation language, it has been my microscope for studying this computational space.

I’ve been thinking about OOP a bit after reading this thread, there might be something like a crude type system possible here, where for example, a pocket.coin(a coin in my pocket) is not the same thing as hand.coin(a coin in my hand) but a state that this coin can transition between.

4 Likes

Reality does not work on mathematics. In fact no mathematical theory can describe the full properties of reality.

For that reason, it does not make any sense to find the ultimate logic.

1 Like