title: Why are Haskell algebraic data types "closed"?
body: <p>Correct me if I'm wrong, but it seems like algebraic data types in Haskell are useful in many of the cases where you would use classes and inheritance in OO languages. But there is a big difference: once an algebraic data type is declared, it can not be extended elsewhere. It is "closed". In OO, you can extend already defined classes. For example:</p>
  
  <pre><code>data Maybe a = Nothing | Just a
  </code></pre>
  
  <p>There is no way that I can somehow add another option to this type later on without modifying this declaration. So what are the benefits of this system? It seems like the OO way would be much more extensible.</p>