A lot of the recent trend towards OOP-bashing comes from bad implementations of OOP, just as bashing design patterns is more to do with badly thought out architectures and overuse of those patterns. In fact, the origins of OOP are basically what we would now call microservice architecture (CSP-inspired languages like Go being a specialisation of this). Each service can be as stateless or as stateful as it needs to be…
In sports, training coaches sometimes forbid to use some play element. In OOP classes there should be an assignment to design a system without inheritance. Just to show what is most important in OOP.
Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
21–30 of 58 posts
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#22"OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things." Bam. That is it right there. Java really messed this up. Strong static typing and OO is an abomination.
So what specifically about OO gets so much better as soon as you take types away? Can you give a specific improvement?
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#23A lot of the recent trend towards OOP-bashing comes from bad implementations of OOP, just as bashing design patterns is more to do with badly thought out architectures and overuse of those patterns. In fact, the origins of OOP are basically what we would now call microservice architecture (CSP-inspired languages like Go being a specialisation of this). Each service can be as stateless or as stateful as it needs to be…
It seems to me that you can't really do message passing in most languages with high efficiency? (Objective-C and Swift being the exceptions.)
So if you want to embrace high performance (and concurrent), go message passing. Alan Kay's favor of late binding does not help performance, as method lookup at run-time dominates the cost then, but the fast systems are early bound, i.e. typed.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#24Earlier quoted context omitted.
It seems to me that you can't really do message passing in most languages with high efficiency? (Objective-C and Swift being the exceptions.)
I think it's a bit charitable to call what Objective C does to be "message passing". The messages are not asynchronous and have only a single recipient, so in practice I would say they're method calls with late binding.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#25Towards the end: But just to show how stubbornly an idea can hang on, all through the seventies and eighties, there were many people who tried to get by with "Remote Procedure Call" instead of thinking about objects and messages. Sic transit gloria mundi. Can somebody explain to me what distinction he's drawing here? What's the issue with RPC that's solved by Objects+Messages?
Kay gives the example of the Internet itself. A GET request for a URI used to be understood as an RPC: download the file at this path. But today GET requests are routinely abstracted. There is no literal directory /r/programming on reddit. Instead path components are better understood as parameters, i.e. arguments in a message send! And this lets them do anything they want, be implemented in any manner at all.
Unfortunately, this is one directional. Your browser makes an abstract request, but the server replies with literal code (e.g. JavaScript) that it wants executed on its behalf. The browser is sending messages to the server, but the server is making RPC calls to your browser.
This gives some insight into the relative stagnation of the client-side, compared to the explosion of server-side. Kay wrote that, if you communicate via messages, then "each object could be implemented using the programming language most appropriate for its intrinsic nature." We have that on the server, but are a million miles away from that with clients.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#26Earlier quoted context omitted.
For example an automobile can be thought of as an emitter of pollution, if your problem concerns pollution, or, it can be thought of as a particle, if your problem concerns traffic congestion. The auto "fits" into each of these different problem domains.
Thanks for the reply, but I'm still not seeing the connection to algebra?
That probay doesn't clarify the connection, but at least you'll be pointed in the right direction! :)
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#27Earlier quoted context omitted.
For example an automobile can be thought of as an emitter of pollution, if your problem concerns pollution, or, it can be thought of as a particle, if your problem concerns traffic congestion. The auto "fits" into each of these different problem domains.
Thanks for the reply, but I'm still not seeing the connection to algebra?
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#28Earlier quoted context omitted.
For example an automobile can be thought of as an emitter of pollution, if your problem concerns pollution, or, it can be thought of as a particle, if your problem concerns traffic congestion. The auto "fits" into each of these different problem domains.
Thanks for the reply, but I'm still not seeing the connection to algebra?
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#29Earlier quoted context omitted.
It seems to me that you can't really do message passing in most languages with high efficiency? (Objective-C and Swift being the exceptions.)
Rather the opposite. Almost all HPC (high-performance computing) systems use message passing and not shared memory. The fastest and imho best unix-like kernel L4 is entirely MP based. So if you want to embrace high performance (and concurrent), go message passing. Alan Kay's favor of late binding does not help performance, as method lookup at run-time dominates the cost then, but the fast systems are early bound, i.e…
Of course, you are probably referring to NUMA, but people still actually use that.
Pure OO isn't very much desired in the HPC world, but then neither is pure FP.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#30I wanted to get rid of data.
I didn't understand the monster LISP idea of tangible metalanguage then