<div dir="ltr">It depends on what you want. But you can always use composition instead of inheritance for B. I have beenĀ  using things like alias this, mixin and ufcs to achive multiple iheritence and it works ok for me.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 25, 2019 at 10:40 PM Michelle Long via Digitalmars-d-learn <<a href="mailto:digitalmars-d-learn@puremagic.com">digitalmars-d-learn@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Since D does not support multiple inheritance, is there any way <br>
to effectively achieve this?<br>
<br>
<br>
class A;<br>
class B;<br>
<br>
class C : A, interface!B;<br>
<br>
Then it is as if I have done<br>
<br>
<br>
class A;<br>
interface iB;<br>
class B : iB;<br>
<br>
class C : A, iB;<br>
<br>
But I can then do<br>
<br>
C c = new B;<br>
<br>
(but since I can't make B inherit iB, this is impossible)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div>