Jesse.K.Phillips+D at gmail.com
Sun Jul 7 21:04:18 UTC 2019
On Sunday, 7 July 2019 at 20:42:00 UTC, CheeseWiz wrote:
> On Sunday, 7 July 2019 at 16:37:32 UTC, Jesse Phillips wrote:
>> What you will notice is that the ModelB.Animal class is
>> commented out, the reason for this is because it is not
>> utilized your original model as you never inherited that
>> class, all you did was `alias Attack = Animal.Attack;` but
>> that isn't doing what you think it is doing.
> The compiler forced me to do that to override the base class.
> Irregardless, it is irrelevant.
It did not force you to do that because you did not inherit that
You started with complaints about how verbose D was with the
modeling pattern you wanted to express, you claimed it was
possible and this was an example.
The example actually shows that D does not allow you to model as
you desired, but that wasn't the claim you were making, you said
the example did what you wanted but it doesn't.
More information about the Digitalmars-d