Stateless Actors

(massicotte.org)

5 points | by frizlab 1 day ago

1 comments

  • mrkeen 1 minute ago
    A race condition:

      Two processes intend to add two to a number.
    
      They each read the current value.
    
      Then they each write back the value which is two bigger then the original.
    
    If you instead use private fields and public getters/setters, or use actors to form a protective bubble around the mutable state, you get...

    The exact same thing but with more boilerplate.