Comment Comment by justasitsounds > I don’t know Go well, but this API would surely piss Alan Kay off.> Why a function that takes an Actor instead of each Actor being a type that implements a receive function?That function is a method with receiver type `Actor` - IE `Actor` implements this HandleMessage function.Granted it is exactly equivalent to ``` func HandleMessage(a *Actor, from gen.PID, message any) error { ... } ```But I'm happy sticking with composition over inheritance parent justasitsounds 2 years ago
> Why a function that takes an Actor instead of each Actor being a type that implements a receive function?
That function is a method with receiver type `Actor` - IE `Actor` implements this HandleMessage function.
Granted it is exactly equivalent to ``` func HandleMessage(a *Actor, from gen.PID, message any) error { ... } ```
But I'm happy sticking with composition over inheritance