Encapsulation and composition as orthogonal operators on mixins: a solution to multiple inheritance problems