Future of contract-based programming in D
Pierre Krafft via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 8 05:07:16 PDT 2015
On Wednesday, 8 April 2015 at 11:26:38 UTC, Kagamin wrote:
> BTW, what do you think about this problem:
> http://forum.dlang.org/post/cokicokwqnscaktxifze@forum.dlang.org
> ?
That's a great feature! Don't inherit if it's not the right tool,
and it almost never is. We have interfaces and alias this with
@disable so composition is really easy to do.
I am starting to think that when we have multiple alias this we
would be better of if we stopped using inheritance at all. Except
for the syntax I can't come up with a problem that would be
better solved using inheritance than using composition.
More information about the Digitalmars-d
mailing list