On Wednesday, 8 April 2015 at 13:34:29 UTC, Pierre Krafft wrote:
So use a collection of interface instead of a collection of base class. If you squint you could say that what I promote is a way of doing inheritance, and I would agree. This is like doing inheritance, with a bit worse syntax but with greater flexibility.
How can it improve DbC? No matter what implements interface, if it needs to strengthen its contract, it fails. Also composition is an implementation detail, abstracted by the interface, right? How is it relevant?
