For sure it can yet be improved.
But I don’t think this to be a very good idea for several reasons:
- The biggest part in the library will be the messaging protocol if we come to the API functions, supervision … This stuff must remain together.
- The core implementation of actor primitives (
newLink
,spawn
, and the actor loop) is actually quite small and will not grow much. - This is also needed internally if we want
Actors
to provide a registry for all libraries using it. A registry is part of a modern actor API. It must be kept at a central place.Actors
will therefore contain a registry server. - As far as I can see
Actors
will remain a small library: registry, error handling, grouping actors, monitors and the supervision tree are not very much code. - Sockets, TCP, … protocols with foreign actors can all be implemented by ecosystem libraries.
As @fborda mentioned infrastructure libraries will become more important than Actors
itself. Actors
will be a stepping stone for those.
But yes, even if the interface is already small, we should try to simplify it further. Thank you for keeping me thinking .
BTW:
Those are all part of the messaging protocol. Explanation of the messaging protocol is still missing in the documentation. Func
is needed to send and store functions and arguments.