I’d like to explore here a rebuttal of @natecull’s incredible post about systems thinking, a defense of Alan Kay’s ideas and what computing would look like if those ideas were taken to the extreme.
I have been thinking about the same problem on introspectable, malleable computing and I feel I landed on the same place Alan had been exploring; the object model is starting to make more and more sense, while going the other way, reducing everything into dumb data-streams, is a dead end, and one we’ve been at for 30 years.
Here is my problem: I am writing this to you from a machine which has 20 independent CPUs, and the problem of multicore programming is still very much unsolved unsatisfactorily today. Additionally, my machine like most others is permanently connected to billions of worldwide others and they are only able to communicate at the very low level of dumb bitstream of numbers, so every program reimplements their own communication code.
The thing is, we have cracked computing, but we still reimplement communication, by hand, badly, in every program, and still forget the fact that even computation is useless without a way to communicate its result. A high-performance crunching tool written in C++ (because computation is king, I hear them cry!) has a buggy, incomplete, painfully hand-written communication layer to publish its result on a screen, on a Slack message board, on a web page. Why isn’t communication first class, in the age of the Internet?
Below are some ideas:
Actors
Actors are great at managing the complexity of concurrent/parallel/multicore programming. What are actors though? They are an opaque thing one can send messages to and receive responses from. That’s the exact definition of an object. There is a 1:1 relationship between Hewitt’s actors and Kay’s objects.
Networked objects
Next: why am I interacting with Google through a bag of bytes encoded in HTML? It would be more amenable to explorative programming if I could converse with it. I don’t want to reimplement Chrome from scratch and to talk with Google through bytes of data, I want to be able to do:
> google = new WebObject("https://www.google.com")
> google listMethods
query/1 signIn/2
> google query: "foo"
[
{ position: 1, url: "https://foo.com", title: "Visit foo.com" },
{ position: 2, url: "https://en.wikipedia.org/wiki/Foo", title: "Foo - Wikipedia" },
...
]
We shouldn’t have to reinvent communication in every program. It should be as easy as adding two numbers. It should be the base layer for computers, not something tacked on at the end. Not in 2024.
HTML should not even exist. The entire Internet should be a massive RPC layer of heterogenous services that expose behaviour. When you connect to my “website”, you should not get a bytestream of HTML, but as Alan Kay suggested, the interpreter should come with it. In other words, you should receive an object, a piece of program, that you attach an output to, and does whatever it wants with it. Free from the limitation of the protocol, my “website” can do anything (computable) on the set of inputs you have given it—an object representing a Canvas, and an object representing keyboard/mouse input.
Security and sandboxing
Which takes us to the other fantastic idea object give us: the object-capability model. A true, fully object-oriented world and paradigm are objects that can only talk with other objects they have received as input. You don’t need a “sandbox” and “permissions” any more. My computable website example above cannot do anything apart from drawing into a canvas and reading input, because those are the only thing you have given it access to. The “what does this piece of code have access to?” problem of computer security becomes “this piece of code has only access to the objects it knows about”.
Network transparency
Kubernetes should not exist either. I should be able to take a running object and “move” it transparently to another node over the Internet. Why is computation still local and we have massive infrastructures to be able to transparently run computation on more than one machine? This goes on a deeper layer than Alan Kay’s objects, but it is a natural evolution of making computing architecture-independent and easily serialisable so it can be transmitted over the wire and executed remotely.
These are some of the affordances that making objects, and communication, first-class would enable. No, I do not think we need to reduce computing to simple data because it’s what we have now, and it is clear to me that it’s one abstraction layer too low to fully leverage modern hardware and the existence of the Internet.