Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread Jean Cesar via Digitalmars-d-learn
On Saturday, 18 February 2017 at 19:45:45 UTC, biozic wrote: On Saturday, 18 February 2017 at 19:05:14 UTC, Jean Cesar wrote: This is exactly what I want this code I did to understand how would apply multiple inheritance in D, C # also process using interfaces but the difference from C # to D

Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread biozic via Digitalmars-d-learn
On Saturday, 18 February 2017 at 19:05:14 UTC, Jean Cesar wrote: This is exactly what I want this code I did to understand how would apply multiple inheritance in D, C # also process using interfaces but the difference from C # to D is that C # already in the base class you have to define it

Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread Jean Cesar via Digitalmars-d-learn
On Saturday, 18 February 2017 at 16:27:51 UTC, biozic wrote: On Saturday, 18 February 2017 at 12:56:51 UTC, wiki wrote: On Saturday, 18 February 2017 at 09:33:25 UTC, biozic wrote: A mixin can be used to provide an base implementation for the methods of an interface, along with data members,

Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread biozic via Digitalmars-d-learn
On Saturday, 18 February 2017 at 12:56:51 UTC, wiki wrote: On Saturday, 18 February 2017 at 09:33:25 UTC, biozic wrote: A mixin can be used to provide an base implementation for the methods of an interface, along with data members, so that you don't have to define it in every class that

Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread wiki via Digitalmars-d-learn
On Saturday, 18 February 2017 at 09:33:25 UTC, biozic wrote: On Friday, 17 February 2017 at 23:35:33 UTC, Jean Cesar wrote: On Friday, 17 February 2017 at 23:31:41 UTC, Adam D. Ruppe wrote: On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote: so I changed the code to use interface

Re: Converting multiple inheritance code into C ++ for D language

2017-02-18 Thread biozic via Digitalmars-d-learn
On Friday, 17 February 2017 at 23:35:33 UTC, Jean Cesar wrote: On Friday, 17 February 2017 at 23:31:41 UTC, Adam D. Ruppe wrote: On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote: so I changed the code to use interface but how would I do so I could use the constructor in the same

Re: Converting multiple inheritance code into C ++ for D language

2017-02-17 Thread Brian Rogoff via Digitalmars-d-learn
On Friday, 17 February 2017 at 23:24:57 UTC, Nicholas Wilson wrote: Something like this would be a goods use for struct multiple alias this, except that we haven't implemented that yet unfortunately. What's the deal with that? It seems someone made progress on this issue 2 years ago and then

Re: Converting multiple inheritance code into C ++ for D language

2017-02-17 Thread Jean Cesar via Digitalmars-d-learn
On Friday, 17 February 2017 at 23:31:41 UTC, Adam D. Ruppe wrote: On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote: so I changed the code to use interface but how would I do so I could use the constructor in the same way as such a C ++ code? Interfaces + mixin templates give you

Re: Converting multiple inheritance code into C ++ for D language

2017-02-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote: so I changed the code to use interface but how would I do so I could use the constructor in the same way as such a C ++ code? Interfaces + mixin templates give you something very similar to multiple inheritance. You can have named

Re: Converting multiple inheritance code into C ++ for D language

2017-02-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote: import std.stdio; import std.string; I've been reading a bit about multi-inheritance in D, but I have to use interface like C # to use multiple inheritance, but I have the code in C ++ that I've been testing to understand how it

Converting multiple inheritance code into C ++ for D language

2017-02-17 Thread Jean Cesar via Digitalmars-d-learn
import std.stdio; import std.string; I've been reading a bit about multi-inheritance in D, but I have to use interface like C # to use multiple inheritance, but I have the code in C ++ that I've been testing to understand how it would be possible to implement multi-inheritance constructor