Re: Build interface from abstract class

2018-05-30 Thread DigitalDesigns via Digitalmars-d-learn
On Wednesday, 30 May 2018 at 10:31:27 UTC, Simen Kjærås wrote: On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: I do not think this is a problem in D. Infinite recursion can always be terminated with appropriate means. 1. Use attributes. methods in class A should be marked as

Re: Build interface from abstract class

2018-05-30 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: I do not think this is a problem in D. Infinite recursion can always be terminated with appropriate means. 1. Use attributes. methods in class A should be marked as being for the interface. When added to the interface they will not

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Wednesday, 30 May 2018 at 01:46:30 UTC, Chameleon wrote: On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: Here is my solution that does not solve problem 2: import std.stdio; [...] this is not programming. this is witchcraft! Just call me Dandalf the D Slayer! At

Re: Build interface from abstract class

2018-05-29 Thread Chameleon via Digitalmars-d-learn
On Monday, 28 May 2018 at 20:13:49 UTC, DigitalDesigns wrote: Here is my solution that does not solve problem 2: import std.stdio; [...] this is not programming. this is witchcraft!

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 20:53:14 UTC, DigitalDesigns wrote: On Tuesday, 29 May 2018 at 20:26:52 UTC, arturg wrote: On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 20:26:52 UTC, arturg wrote: On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks,

Re: Build interface from abstract class

2018-05-29 Thread arturg via Digitalmars-d-learn
On Tuesday, 29 May 2018 at 19:06:24 UTC, DigitalDesigns wrote: On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks, So, the problem I'm having is that I cannot use the

Re: Build interface from abstract class

2018-05-29 Thread DigitalDesigns via Digitalmars-d-learn
On Monday, 28 May 2018 at 22:15:40 UTC, arturg wrote: this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings. Thanks, So, the problem I'm having is that I cannot use the generated interface for the abstract class because the abstract

Re: Build interface from abstract class

2018-05-28 Thread arturg via Digitalmars-d-learn
this might help you, https://dpaste.dzfl.pl/2cf844a11e3f you can use them to generate the functions as strings.

Re: Build interface from abstract class

2018-05-28 Thread DigitalDesigns via Digitalmars-d-learn
On Monday, 28 May 2018 at 11:51:20 UTC, Simen Kjærås wrote: On Monday, 28 May 2018 at 09:59:50 UTC, DigitalDesigns wrote: Implementing interfaces can be a pain but are necessary. I like to use abstract classes and provide a base implementation. It would be cool if I could use D's awesome

Re: Build interface from abstract class

2018-05-28 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 28 May 2018 at 09:59:50 UTC, DigitalDesigns wrote: Implementing interfaces can be a pain but are necessary. I like to use abstract classes and provide a base implementation. It would be cool if I could use D's awesome meta features to extract the interface from the abstract class

Build interface from abstract class

2018-05-28 Thread DigitalDesigns via Digitalmars-d-learn
Implementing interfaces can be a pain but are necessary. I like to use abstract classes and provide a base implementation. It would be cool if I could use D's awesome meta features to extract the interface from the abstract class then build it. This requires some funky stuff which I'm not