On Wed, Jun 25, 2014 at 4:33 AM, Rob Earhart <[email protected]> wrote:

> One of the things I love about writing code in Go is that it's all
> interfaces, no class hierarchies.  So it's at least possible.  The
> embedding
>

In C# that has both , programs with lots of inheritance are harder to work
on and FAR harder to test and maintain than those that use a lot of
interfaces. It is not a coincidence that there has been a significant move
in Java and C# from inheritance to interfaces over the years. There will
always be someone who will put crap into a base class . Personally i don't
really use inheritance anymore in C# , maybe once in a blue moon  , i
always pull the base logic out and inject it  , inheritance + generic +
interface is just too much.

I also note that shared code in base classes tends to have code not related
to the type , with an interface the code stays closer to what the type is
supposed to do  with the extra code being injected.  ( Part of this is due
to lack of multiple inheritance but the cost of that in complexity is not
worth it either)  . Starting from what the type is supposed to represent
ala biological categorization is a very difficult task - better to just
represent its properties.

Ben
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to