Idea Oriented Programming

date:

last edit:

About three years ago, when I saw object-oriented programming for the first time, I realized a curious thing, and it is that it has a great resemblance to Plato's Theory of Ideas, at the time Imade a couple of jokes with that and in part, it helped me understand the concept better, but a few days ago I revisited this idea and began to reflect on the subject, so I write this post so that those reflections do not remain only in my head. But first I would like to give an explanation about what exactly Plato's Theory of Ideas was. Broadly speaking, we could explain it as a series of three dualisms to explain reality.

This is an old post from a blog I used to have called Lambda Lain, now, I understand a lot better things related this, but I'm going to keep the blog as it was

Ontological dualism

The first dualism is the ontological one, that is, of reality; which consists of dividing reality into two worlds, on one hand the sensible world and on the other one the intelligible world. In the sensible world, there are sensible things, that is, all those that are subject to change, while in the intelligible wolrd, it is where the ideas or forms or subsisting essences of things exists.

A couple of examples would be that in the sensible world horses run, while in the intelligible world there is the idea of a horse. In the sensible world there are humans, while in the intelligible world there is the idea of being human. Although Plato's favorite examples always refer to values: justice itself, beauty itself, courage itself, etc.

An important thing to keep in mind is that Plato's ideas are not the same as what we commonly understand as "idea", it doesn't refer to the moment when something occurs to you. Plato's ideas doesn't need us to think of them to exist.

Plato's referred to this concept as eidos, which translates more or less as "idea" and comes from the Greek verb éido which means "to see", that is, the eidos, the idea is something that you can see, with the intellect and is outside of us. Plato's idea is not a mental notion.

Plato was highly influenced by Socrates when thinking about this idea, as you surely know, Socrates was a man who went around asking people the definition of things, what is love? what is justice? Socrates' activity then consists in asking about the essence, the "what" of something. Being the essence what remains below the changes or the possible multiplicity.

An example of change is yourself: you were conceived, you were born, you grew up and at some point you are going to die, but in all these changes you have remained as a human being.

An example of multiplicity is that there are millions of human beings, they are all very different, but there is something that makes us say that they all have something in common and that is that they are all human beings. This is what we speak of when we refer to the essence.

The process of construction of the theory of ideas begins when Plato begins to ask himself: What is the ontological status of essence? i.e. this essence that is the answer to the Socratic question, where is it? how is it? what is it? what type of reality or entity does it have?

the reasoning is more or less the following: there are just acts and unjust acts, that is something we see every day, but there could not be just and unjust acts if justice did not exist in some way. or, there are beautiful things, but beautiful things could not exist, if somehow beauty didn't exists. Therefore, this essence of things, justice and beauty, have to exist. if they didn't exist, i could not find these characteristics in things. it would not make sence to say: "this flower seems beautiful to me" if beauty itself doesn't exist.

Now, I don't meet beauty on the street, I meet things that are beautiful, in the same way I don't meet justice on the street, I meet acts that are fair or unfair, I can even do them, but I don't create justice, rather, I can do acts that are fair.

Therefore, if justice and beautiful exist, and they have to exist because if not, I cannot explain the phenomena that I find myself in the sensible world, they have to exist, in another place, and also be of a non-sensitive nature, because I have never seen or touched them.

But, even though I have never seen or touched ideas, I know them, I recognize them, because I recognize them in things. How is this recognition possible? Well, not with the senses, but with reason. This is where the following dualism comes in: the epistemological one that means knowledge.

Epistemological dualism

In knowledge, on one hand we have the senses and on the other hand we have the reason. The reason is who knows or recognizes the ideas, essences or forms from the data that the senses give us. So far, we have two worlds, one in which sensible things exist and another where intelligible things, ideas or forms exist. Futhermore, we have two modes of knowledge, one for each world: the senses and reason.

These two dualisms correspond in turn to a third, anthropological dualism, which divides the human being into two realities, body and soul.

Anthropological dualism

The body corresponds to the sensible world and the senses, while the soul corresponds to the world of ideas and reason. But in this dualism, the relationship between the two extremes is more conflictive. The body is here, in Plato's words, the prison of the soul [Phaedo, 82e]. And the soul yearns above all to free itself from the body and return to the world of ideas to directly contemplate the object of its desire.

Returning to ontological dualism, here each of the two worlds corresponds to a series of characteristics that can then be transferred to each of its correlates, to the senses and the body, and to reason and the soul. These characteristics will be in opposition all the time, for example, if the sensible world is visible, the intelligible world is invisible, if the sensible world is mutable, the seat of change, then the intelligible world is immutable, the seat of what doesn't change, of what remains.

if sensible things are temporary, intelligible things are eternal and unchanging. If sensible things are bodily, ideas are disembodied, inexistent and don't take up space. If the sensible is mortal the ideastic, the ideas are inmortal. If sensible things are imperfect, the ideas are perfect.

This is transferred above all to the position between body and soul, in fact many Christian philosophers take up this idea to talk about the relationship between God and humans, in addition to their idea of the soul. Ideas are so much more real than things, that if there were no ideas, there would be no things as we know and understand them. Ideas are the foundation, the base, the condition of possibillity of things, that things are what they are and that we can know them, because if there were nothing stable or permanent in change, we couldn't know. Ideas are the true reality, everything that is real in things, they owe to ideas.

Given all this information, I think it is easy to deduce that for Plato, the world of ideas was more real than the sensible world, since things are mere copies of ideas.

How are things and ideas related

Plato explains the relationship with three metaphors:

The Participation (méthexis): From bottom to top, from the thing to the idea: The thing participates in the idea, the thing aspires to the idea, tries to resemble or exemplify it, as if it were oriented to the idea and wanted to achieve its perfection, the idea is its model and the thing tries to imitate it.

The Presence (parousía): From top to bottom, from the idea to the thing: the idea becomes present in the thing, the idea manifests itself in the sensible world through the thing.

The Community (koinonía): Double direction: There is a certain communion or community between the thing and the idea, this is explained by the double relationship seen before.

This is a small sketch of Plato's perceptions, he throughout his life revisits, changes and reflects on his thoughts, for example: At first he thought that there were ideas of both positive and negative reality, that is, like, as there is justice, the is injustice, but it ends up rejecting this, leaving only the ideas of positive reality, the negative ones being the absence of the positive ones.

Later he incorporates mathematical principles as ideas and in another dialogue he introduces the figure of the Demiurge who is a kind of God or Demigod who, like a kind of sculptor, sculpts or models material reality taking ideas as a model.

Another interesting change is the hierarchy of ideas. There must be a upreme idea, but in the banquet dialogue, the supreme idea is beauty, and in the dialogue the republic the supreme idea has changed and is good.

Recapitulating, Plato's philosophy can be broadly structured into three correlated dualisms, these being: ontological, epistemological and anthropological.

Ontological divides reality into two worlds, the sensible and the intelligible. Epistemological divides knowledge between the senses and reason. Anthropological divides the human being into body and soul.

In these dualisms the primacy always corresponds to the non-material and non-sensible extreme, that is: To ideas about things, to reason respect to the senses and the soul respect to the body. Finally we have seen that there is a certain community between sensible things and their ideas that explains their relationship, things participate in the idea and the idea is present or manifested in things.

The key to all this is to realize that Plato defends that without ideas, without essences or forms as separate subsisting realities, the sensible world cannot be explained, the world of phenomena as we know it, ideas are the model of things and things are a mere copy, whitout the model, the copy couldn't be explained.

But at the end of the day, what does all this have to do with Christmas?

Well, object-oriented programming starts from a similar idea, broadly speaking, it consists of abstracting objects from real life to code, through their properties and methods, the things that make it what it is and how it interacts with its enviroment. That is, instead of having a variable called temperature, we have an object called thermometer, which has a numerical property that reflects the current temperature, data that it gives us through a method, and through another method it's constantly changing. It is, indeed the idea of a thermometer represented through the code. When we write software and we extract all procedural thinking from our code and focus solely on using objects, the object becomes a software abstracton of reality. When you write software, you are translating your ideas, your concepts, into code. Ideas that live in the machine that executes it, through its behaviors and interactions with other objects, all defined by you. Each programmer is the Demiurge who takes ideas and molds them to form sensible things, projects his mind on the software.

Actually there is something called Object-Oriented Otnology, that is a philosophical position that objects exist independently of human perceptiond and questions the central role of human perspective within traditional philosophy.

But, for what purpose? Transfer those ideas to others, of course. It is to visit that inhospitable territory, that region from which everything emanates, the world of ideas, with the aim of bringing the touch of the abstract, an extract of the perfect and capturing that glance in a sensitive but intangible thing on silicon. Very similar to how the artist does.

(huh... Sorry for that cringy part, that was 4 years ago...)

We could even extrapolate it to the level of language, because in the end, a programming language is not very different from a language like the one you speak and the one I speak, it is a language to communicate with machines, exactly like Spanish and English helps us communicate with other people. Words are a mutual agreement, it's to give meaning to a series of sounds and symbols to represent ideas, and that, put together, represent more complex ideas and transmit them to others. This forms a direct correspondence between word, idea and software.

Is language a representation of the world of ideas? Or, are languages really that world of ideas? What is the role of software in all this? To what extent are we creating a new sensible but intangible layer?

Because, we are creating sensible, but intangible things, nothing more than through the contact that we can have with ideas through reason, they are things that manifest in the sensible world, because we can see them, we can interact with them through of our peripherals and if you take it to electronics using an Arduino or a Raspberry Pi you can even make it interact with the enviroment, creating an automatic irrigation system or whatever. Are the objects in the software of a sensible or idematic nature?