The main inspiration for role-oriented programming is to make programming languages similar to the human conceptual understanding of the world. Role-Oriented Programming is an attempt to make programs be expressed in the same terms as our conceptual understanding of the world. The hypothesis is that this should make programs easier to understand and maintain. Humans think in terms of roles. This claim is often backed up by examples of social relations. Typically the examples are given where a person is attending a conference and being a reviewer or a person being a student at an educational institution. A person being a student and being at a party is in a way the same person. But in a way it is not the same person, the interactions with the person will be different. Typically this in the theory of human sciences so that the person plays the role of being a student and being an attendee at a party. Typically the two roles share commonality---the intrinsic properties of being a person. This sharing of properties is often handled by the delegation mechanism.
Much research has been caried out in the field af role-oriented programming. In the older literature and in the field of databases, it seems that there has been little consideration for the context in which roles interplay with each other. Such a context is being established in newer role- and aspect-oriented programming languages such as PyMeleon and Object Teams.
Many researchers have argued the advantages of roles in modeling and implementation. Roles allow objects to evolve over time, they enable independent and concurrently existing views (interfaces) of the object, explicating the different contexts of the object, and separating concerns. Generally roles are a natural element of our daily concept forming. Roles in programming languages enable objects to have changing interfaces, as we see it in real life—things change over time, are used differently in different contexts, etc.
Authors of role literature
- Reenskaug
- Gottlob
- B. B. Kristensen
- K. Østerbye
- Friedrich Steimann
- Stephan Herrmann
- Pernici
- K. Graversen