Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On the note of Euclid's Elements, I took a short course on Plato's "Theory of Forms" when I was just learning to really code and it's what helped OOP click in my head. It's fun when totally random subjects help you get an insight into one another.

https://en.wikipedia.org/wiki/Theory_of_forms



I learned to program, and only later read a book on metaphysics, and was rather surprised to find that the book was entirely about software design, although the authors did not seem to be aware of this.


Would you happen to remember which book that was?


I don't, i'm afraid. It was probably the shortest book on metaphysics available in my town library at the time.


Can you ELI5 metaphysics?


"Applied metaphysics

Although metaphysics as a philosophical enterprise is highly hypothetical, it also has practical application in most other branches of philosophy, science, and now also information technology. Such areas generally assume some basic ontology (such as a system of objects, properties, classes, and space-time) as well as other metaphysical stances on topics such as causality and agency, then build their own particular theories upon these.":

https://en.m.wikipedia.org/wiki/Metaphysics


To extend and elaborate on the analogy further : Plato's forms is class-based OOP, the bluebrint is categorically different than the objects it generates, it is the sole source of the objects it generates, and it always comes before the objects it generates. It's also a complete description of every single object it generates: there is not a single thing you can do to the generated objects that is not precisely described and predicted by the blueprint*.

There's another way : Nominalism, abstract blueprints and concepts don't exist, they are just artificial markers we put on sets of concrete objects to express some degree of similarity. That is, There's no such thing as a 'Tree' in the abstract, there's only the green thing with roots and branches under your house and the green thing with roots and branches under mine, we gave them (and countless other green things with roots and branches) the same name merely to express that we view them as equal under some circumstances, but that name doesn't express anything about the concrete objects themselves, just our brains, each object is completely unique and incomparable to any other in any objective way.

Nominalism is similar to prototypical OOP, there is no such thing as a blueprint, concrete objects spring fully-formed into existence directly from the mind of their creator, or they are cloned from other concrete objects. If blueprints exist at all, they are only external descriptions by us observers to denote similarities: that object has x: and y: attributes and that object also has x: and y: attributes (possibly because it's a clone of the first) so they are the same 'type', but those objects don't 'know' they are the same type (well, they do if they're clones, as they point to the same parent, but whatever), and the universe allows any object to grow and shrink and morph independently of any other, similarities are imposed/discovered solely by observation from the outside.

*:This principle might be violated in dynamic object systems with sophisticated meta-object protocols, as the blueprint itself is just an object that you can manipulate and mutate at runtime with various things not in the static description.


Yes, those Forms have had a lasting impact on Western Philosophy for a long time. I wouldn't be surprised if some of it hasn't had some impact on the OOP thinking, in general, even though indirectly. If you read on Hume and the British Empiricists from the 18th Century, for example, you'd be surprised how many "modern ideas" you find in there. After all, programming languages at large have a long history of philosophical ideas before them. Before they could come into being, that is.


Absolutely this! Some Neoplatonist literature distinguishes between God qua engineer of forms and God qua reifyer of them. And there's object inheritance implicit in their hierarchy of forms/angels, ie. Eriugena's that which creates and is created.

Platonism is like ontological OOP. :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: