Live data from Hacker News

Alan Kay on the meaning of "object-oriented programming" (2003)

notes.shixiangxi.com

21–30 of 95 posts

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#21
I studied the history of OOP a while back because I was curious, and I organized what I learned into my personal wiki[1]. From what I remember, there were quite a few different perspectives on it. One view traces OOP's practical ancestry back to Ole-Johan Dahl's Simula. From Alan Kay's perspective, on the other hand, an object was something like a small computer of its own.

The two main lineages of OOP are Simula and Smalltalk. But from what I recall, modern languages actually inherited more from the Simula side in practical terms, while the terminology and philosophy were influenced more by Smalltalk. [1]https://www.makonea.com/en-US/wiki/object-oriented-programmi...

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#22

There was a Soviet philosopher, Evald Ilyenkov, whose books taught me about a "minimal working model". I'll explain it in my own words. People do not think with words: people think with things. Words serve merely as pointers to things. Some things are easy to point at; Ilyenkov talks about a cow. Some things are much harder to point at; Ilyenkov, being a Marxist, wanted to point to private property, we need to point…

That's super interesting. Thank you for that.

I believe what's missing is not just data. That'd only grant it capabilities that upgrade it to a "record" type of entity. I believe an OOP object is more than a record. It's missing behavior triggered by messages. For an object to pass or receive a message we need to have a model of a message and that requires the notion of a sender and receiver, both objects again. Seems circular, but I'm sure it could be made to work if you properly define everything. Anyway, to my mind perhaps the minimal model of an object is not at all _one object_ but a _relation_ between two or more objects showcasing the minimal "message passing" semantics.

Weird take, but inheritance could be included if you accept something can inherit from itself. A is a type of A, I mean it doesn't strike me as wrong, but it is unconventional.

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#23

IMO, the most important philosophy in all of software engineering is "Separation of responsibilities." The best way to achieve it is through the principle of "High cohesion, loose coupling." OOP is just another layer of philosophy which builds on top of that. It's more specific, imposes additional guardrails. It requires objects with state encapsulation (locality) and message-passing as the mechanism for components t…

This resonates strongly with me, which is why I find more important having some form of namespacing than anything else.

OOP has been muddied so much too, it would be interesting if we taught only the "separation of responsibilities" part and principles related to that.

Often it comes up: who has write authority, that's something we don't teach as part of OOP, yet realizing that only one thing should do writing improves the code dramatically.

Now that you see it, seems so obvious

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#24

That's the Smalltalk school of OOP. There is also the Simula school. It is kind of unfortunate that they use the same name.

> That's the Smalltalk school of OOP

In particular the "Smalltalk-72 school" which had indeed something like "message passing" (though still synchronously). Starting from Smalltalk-76, and particularly in Smalltalk-80, which is the Smalltalk we know today, the object model pretty much corresponds to Simula-67, with compiled methods dipatched via virtual method tables. The only difference is, that in Smalltalk, the dispatch goes via the internalized string address of the selector (vs. method index as e.g. in Simula-67, C++ or Java). See e.g. https://dl.acm.org/doi/10.1145/3386335.

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#25
post #14

There was a Soviet philosopher, Evald Ilyenkov, whose books taught me about a "minimal working model". I'll explain it in my own words. People do not think with words: people think with things. Words serve merely as pointers to things. Some things are easy to point at; Ilyenkov talks about a cow. Some things are much harder to point at; Ilyenkov, being a Marxist, wanted to point to private property, we need to point…

Your example lacks data. An object is the combination of data and code manipulating the data with some syntactic sugar on top

Data will indeed be necessary. But data in OOP are interesting: they are not supposed to be directly visible. They are like the method body: there is one, but it is not important what it is. So if we add data, it will be that:

    class Aaaa
      (some data)
      method bbbb():
        (some code)
Do you think this is an object now?

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#26
post #21

I studied the history of OOP a while back because I was curious, and I organized what I learned into my personal wiki[1]. From what I remember, there were quite a few different perspectives on it. One view traces OOP's practical ancestry back to Ole-Johan Dahl's Simula. From Alan Kay's perspective, on the other hand, an object was something like a small computer of its own. The two main lineages of OOP are Simula and…

Cool; though a few facts on your landing page might need some reconsideration. See e.g. https://news.ycombinator.com/item?id=36879311.

> something like a small computer of its own

Which corresponds pretty well with the Simula I concept, published 1966 in the Communications of the ACM. A Simula event notice (time, process) in the sequencing set is just a message step(process, time) in a priority mailbox; the two are the same mathematical object, making Simula's discrete-event active processes and Kay's message-passing active objects trivially isomorphic.

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#28
post #26
post #21

I studied the history of OOP a while back because I was curious, and I organized what I learned into my personal wiki[1]. From what I remember, there were quite a few different perspectives on it. One view traces OOP's practical ancestry back to Ole-Johan Dahl's Simula. From Alan Kay's perspective, on the other hand, an object was something like a small computer of its own. The two main lineages of OOP are Simula and…

Cool; though a few facts on your landing page might need some reconsideration. See e.g. https://news.ycombinator.com/item?id=36879311 . > something like a small computer of its own Which corresponds pretty well with the Simula I concept, published 1966 in the Communications of the ACM. A Simula event notice (time, process) in the sequencing set is just a message step(process, time) in a priority mailbox; the two are…

thanks! I checked the link and there are indeed quite a few inaccuracies in the initial part. I'll go through it and make corrections.

Re: Alan Kay on the meaning of "object-oriented programming" (2003)

#30
post #27

> OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. This sounds a lot like microservice architecture.

I too think that microservices and REST are Kay OOP, although through a network boundary of course

The separation of objects and usage of network protocols naturally forces interaction via communication and not data sharing, so perhaps as an emergent phenomenon it converges on Kay OOP. Although no doubt Netflix Microservice OG engineers were influenced by both Kay and Java.

Post reply on HN