title: Has inheritance become bad?
body: <p>Personally, I think inheritance is a great tool, that, when applied reasonably, can greatly simplify code.</p>
  
  <p>However, I seems to me that many modern tools dislike inheritance. Let's take a simple example: Serialize a class to XML. As soon as inheritance is involved, this can easily turn into a mess. Especially if you're trying to serialize a derived class using the base class serializer.</p>
  
  <p>Sure, we can work around that. Something like a <code>KnownType</code> attribute and stuff. Besides being an itch in your code that you have to remember to update every time you add a derived class, that fails, too, if you receive a class from outside your scope that was not known at compile time. (Okay, in some cases you can still work around that, for instance using the NetDataContract serializer in .NET. Surely a certain advancement.)</p>
  
  <p>In any case, the basic principle still exists: Serialization and inheritance don't mix well. Considering the huge list of programming strategies that became possible and even common in the past decade, I feel tempted to say that inheritance should be avoided in areas that relate to serialization (in particular remoting and databases).</p>
  
  <p>Does that make sense? Or am messing things up? How do you handle inheritance and serialization?</p>