Does anybody know how instances of classes that use mixins are implemented? I would like them to consist of one object of storage, where the data members of “with”ed mixins are contained within the object. However, it is possible to implement them less efficiently by delegation, where the instance contains a pointer to a instance of the mixin class. How is it really done? Thank you.
I believe a mixin is considered as first-class properties of the class, not delegates, similar to superclasses. In memory, you’d see all the objects alongside each other, whether defined by superclasses or mixins.