Some interesting discussion on roles vs inheritance on SillyMoose’s blog (h/t to Planet Moose)
The executive summary:
- Roles are semantically safer than multiple inheritance because methods from the roles are loaded into the class at compile time and any name clashes are picked up then.
- Roles cannot be instantiated.
Leave a comment