{'fraction_non_alphanumeric': 0.013711151736745886, 'fraction_numerical': 0.0, 'mean_word_length': 5.636363636363637, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Encapsulation and composition as orthogonal operators on mixins: a solution to multiple inheritance problems

In class-based multiple inheritance systems, interpretations as different as duplication, sharing and specialization are associated with the single phenomenon of name collisions. To deal with those name collisions, various mechanisms have been proposed, but these solutions generally restrain software reusability which is considered to be one of the key features of OO systems. On top of this, most multiple inheritance systems do not completely cover all the different interpretations of name collisions. This paper shows that the entire multiple inheritance dilemma can and should be seen as a conflict between inheritance and data encapsulation only. Orthogonalizing these two concepts in a mixin-based framework permits appropriate solutions of all the problems listed above. To this extent a formal model is proposed together with its denotational semantics. This minimal multiple inheritance model establishes a valuable basis for OO languages and software engineering systems.