You are describing Erlang and it can not get simpler than that.
Re:Swift Distributed Actors
by ProfHewitt on Friday October 29, 2021 @12:08PM
(#29040179)
I fondly remember Joe Armstrong, who was a good friend.
However, not having a mathematical foundation has been a
severe limitation for Erlang.
The Erlang community is trying to dig its way out with
modifications and extensions. Still have a long way to go.
Of course, no Actors framework is perfect.
Many important implementations have been done Erlang.
Also, significant Erlang projects are ongoing to good effect.
not really, smalltalk's "actors"[0]/objects are organized around data encapsulation principles. Erlang's "actors"[0]/processes are organized around failure domain principles. It's not unreasonable to go in one direction (making your data encapsulation match failure domains) but if you try to organize Erlang's "actors" around data encapsulation you will wind up with very shitty code (hard to read, hard to test, hard to debug, unnecessary performance regressions), unsurprisingly, because that is not what they were meant to be.
[0] I put actors in quotes because neither are true actor system, either. Nor were either designed to be, though if you squint they look similar.
Re:Swift Distributed Actors
by ProfHewitt on Friday October 29, 2021 @12:24PM
(#29040366)
See the following for a rigorous definition of the Actors
Abstraction:
In recent month's, every time I run across the whole "OO is evil/dead/horrible" meme (esp. common here) it turns out to be someone talking whose experience of "OO programming" is limited to C++/Java and their relatives. If your only exposure to OO was those (and similar) languages, then, YES, OO is horrible and weak and full of leakiness in the abstractions. It's a bit like saying that coffee is horrible when all you've ever tasted is cheap-and-nasty instant made from acorns and floor sweepings. C++ and Java (I can't comment on C#, never having used it in anger) are the palest, anaemic shadow of OO programming.
Rant done. This addition to Swift might cause me to look at it more closely. (I don't have any reason/desire to touch the Apple grow-tunnel (as opposed to ecosystems, which are natural and open.) My thoughts have also recently run along lines of "What if we made every message to an object as if it were always remote (in another address space)?" In other words, for decades we've been trying to make RPC calls look (to the programmer) as if they were "just like local calls" and with justifiable lack of success because remote really is more wrinkly than local. So what if, instead of trying to make "remote" look/behave/imitate "local" we went in the other direction and make all calls look like remote calls? It means we have to think about all the failure modes and partial-failure modes of remote calls all of the time. Only, for local address-space calls, they're going to be much more reliable in practise. Is it worth it? Can we bring down the cognitive overhead to an acceptable level?
I'm interested to see whether this Swift effort/initiative approaches this idealised/simplified description.