Live data from Hacker News

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

notes.shixiangxi.com

51–60 of 95 posts

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

#51
post #42

I think the actor model comes closest to Kay's objects. An object holds it's own state and might change that state based on messages it receives. Today you can find this in, for example, Elixir and Microsoft Orleans.

> I think the actor model comes closest to Kay's objects.

It's rather the other way round. There is no pre-Hewitt implemented semantics matching Kay's later 2001 claims; Smalltalk-72 was a synchronous token-stream interpreter rather than a system of independently active message-driven agents; FLEX shows processes, scheduling and quasi-parallel control, not objects, not messaging, not actor-style autonomous entities.

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

#52
post #4

Earlier quoted context omitted.

> OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. How does Simula differ here?

AFAIU, Simula focused more on types and inheritance and less on late-binding, in particular not of "all things". Alan Kay's distaste for (static) types is just his opinion and an original contribution of IMO rather dubious value. After the dust has settled, it seems like the most valuable parts of OOP are private data, convenience (no need to repeat the class name in a method call), good fit for some domains, and int…

[deleted]

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

#53
post #4

Earlier quoted context omitted.

> OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. How does Simula differ here?

AFAIU, Simula focused more on types and inheritance and less on late-binding, in particular not of "all things". Alan Kay's distaste for (static) types is just his opinion and an original contribution of IMO rather dubious value. After the dust has settled, it seems like the most valuable parts of OOP are private data, convenience (no need to repeat the class name in a method call), good fit for some domains, and int…

> Alan Kay's distaste for (static) types

Citation needed.

TFA quotes him saying almost the opposite:

> (I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing.)

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

#54
post #44
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.

Taken to an extreme. It's not feasible with current microservice architecture to, for example, represent every Boolean in the program as a service.

Feasible with in-process REST.

https://news.ycombinator.com/item?id=48731266

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

#55
post #31

Earlier quoted context omitted.

I think this is looking at what OOP has become (as implemented by systems and programming languages that don't care a wit about what OO was meant to be) rather than what Alan Kay described. If you think about something like a web server as an object, it has arbitrarily high cohesion and arbitrarily low coupling. You can only communicate to it through messages (HTTP); binding happens at the point in time that the mess…

The Alan Kay variant of OOP is superior in this regard, and I'd argue the Erlang variant even more so (Actors are just asynchronous objects). But both of them are still suboptimal because they allow objects to instantiate one another and to directly communicate with whomever they come in contact with. That creates strong coupling and you have to "fight the paradigm" to avoid it. Other engineering domains have this fi…

When you say other engineering domains have figured this out, can you give a more specific example?

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

#56
People are going to come out of the woodwork to argue about OO specifically, and I'd probably join in, but the higher-level view that I've come to over the years is that one programming paradigm is not the best in all situations. It really helps to work on a lot of different systems that are not all in the same class and look at a lot of code written by people of all skill levels. It's not possible to really talk about all programs, but I will say that the OO way of thinking can very easily be overdone and end up a giant mess. Similarly, the FP way of thinking can also be very easily be overdone and end up a giant mess. The old-style procedural programming (C with a pile of global variables) can easily be overdone and end up a giant mess. Yet all three of those can actually work out great at the right scale on the right problem!

I think the problem is that we can't really architect a program well until after it works and fulfills all of its design requirements. Those are usually in flux and then we have to engineer dimensions of extensibility to prevent committing to the wrong architecture in the beginning. Those extra dimensions of extensibility come at some cost too, as they often mean indirection and cognitive overhead.

We often don't write the same program twice, or even three times, unless it's a really important program or a we just like doing it. Contrast to other fields, e.g. building houses, where we have lots and lots of examples of how to do it and they started to form archetypes. We try to call those design patterns in programming, but they're actually pretty vague and low-level. Can you imagine going to build a house and thinking "yeah, I think I need to use the wood-and-nails design pattern here, and I think I'll do rafters-and-shingles there, with some brick-and-mortar there." Yeah, real specific ideas on how to do it.

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

#57
post #31

Earlier quoted context omitted.

I think this is looking at what OOP has become (as implemented by systems and programming languages that don't care a wit about what OO was meant to be) rather than what Alan Kay described. If you think about something like a web server as an object, it has arbitrarily high cohesion and arbitrarily low coupling. You can only communicate to it through messages (HTTP); binding happens at the point in time that the mess…

The Alan Kay variant of OOP is superior in this regard, and I'd argue the Erlang variant even more so (Actors are just asynchronous objects). But both of them are still suboptimal because they allow objects to instantiate one another and to directly communicate with whomever they come in contact with. That creates strong coupling and you have to "fight the paradigm" to avoid it. Other engineering domains have this fi…

Linda and Syndicate figured this out - it’s just that most engineers are not programming language designers or researchers, and most researchers are not designing robust scalable language implementations.

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

#58
post #56

People are going to come out of the woodwork to argue about OO specifically, and I'd probably join in, but the higher-level view that I've come to over the years is that one programming paradigm is not the best in all situations. It really helps to work on a lot of different systems that are not all in the same class and look at a lot of code written by people of all skill levels. It's not possible to really talk abo…

I actually do wonder whether we're going to see more of a prevalence of people building one off software due to an increasing use of LLM's which makes the house building model you're describing more common in software

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

#59
post #36

Earlier quoted context omitted.

Thank you so much. Sometimes I wish there were more documents out there that organized the historical aspects of programming like this.

You'd probably like the work of Tomas Petricek: https://tomasp.net/ He does research in "the history and philosophy of programming", amongst other things.

Amazing. This is exactly the kind of content I wanted to put on my homepage. Thank you

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

#60
post #56

People are going to come out of the woodwork to argue about OO specifically, and I'd probably join in, but the higher-level view that I've come to over the years is that one programming paradigm is not the best in all situations. It really helps to work on a lot of different systems that are not all in the same class and look at a lot of code written by people of all skill levels. It's not possible to really talk abo…

I think the underlying error - is the assumption that everyones model is going to be equal when looking on the world, as a world of objects. That holds up- for a surprisingly small number of objects we all interact with.

Then it breaks down- depending on how deep your abstraction level goes (A car has 4 tires. 4 tires are made of: xyz). It also breaks down, with the abstraction in the real world above the modeler. Some think in organization, some in physics, some in tribalist constructs, some imagine a god object above them some don't. It was communicated as a tool using "shared" state as a communication helper.

But we do not share as much state as expected.

Post reply on HN