What we can’t do yet
As you can see, using parallel and concurrent code isn’t as easy as “Write the code you want and let the tools and compiler make sense of it.” Perhaps we’ll be able to do this in the future with the intervention of AI, although based on my current experience using coding assistants, I have to say this seems very far away.
Instead, you must structure your code for the programming model you choose. And if you start by writing the code base as a single-threaded application and without using functional constructs, changing it will prove difficult. I see parallels between objects and actors and, in theory, it might be possible to turn each object into an actor and each method into an event, but this seems idealistic. The reality is that there are still a lot of things that can go wrong when we switch from a synchronous to an event-based system, and a lot of them are very difficult to debug and require a deep understanding not only...