TSa Thomas.Sandlass-at-vts-systems.de |Perl 6| wrote:
May I pose three more questions?

1. I guess that even using $!A::bar in methods of B is an
   access violation, right? I.e. A needs to trust B for that
   to be allowed.

Correct.



2. The object has to carry $!A::bar and $!B::bar separately, right?
Correct.



3. How are attribute storage locations handled in multiple inheritance?
   Are all base classes virtual and hence their slots appear only once
   in the object's storage?


The slots are direct in that class. The accessor functions are virtual, though.

It is not specified anywhere, nor even discussed that I've found, whether base classes are "virtual" (merged) in the C++ sense. I have this flagged as an open design question.

Since you have "roles", perhaps you don't need virtual base classes. I think no snap decision should be made, but the ramifications and use-cases explored in some detail.
--John

Reply via email to