Diminishing returns of static typing
Just a technical point that hints at a significant philosophical idea: The asymptote cannot reach 100% of program behavior in any finitary way. That would solve the halting problem. The x-axis should go off to infinity. Also, it&#x27;s not a smooth progression. There are huge jumps in expressivity involved here. Going from Java-style types to Hindley-Milner to full System F are all massive jumps in expressivity. There are also <i>incompatible features</i> of type theories. Type theories are a fractal of utility and complexity.<p>A type system doesn&#x27;t only describe the behavior of the program you write. It also informs you of <i>how</i> to write a program that does what you want. That&#x27;s why functional programming pairs so well with static typing, and in my opinion why typed functional languages are gaining more traction than lisp.<p>How many ways are there to do something in lisp? Pose a feature request to 10 lispers and they&#x27;ll come back with 11 macros. God knows how those macros compose together. On the other hand, once you have a good abstraction in ML or Haskell it&#x27;s probably adhering to some simple, composable idea which can be reused again and again. In lisp, it&#x27;s not so easy.<p>A static type system that&#x27;s typing an inexpressive programming construct is kind of a pain because it just gets in the way of whatever simple thing you&#x27;re trying to do. A powerful programming construct without a type system is difficult to compose because the user will have to understand its dynamics with no help from the compiler and no logical framework in which to reason about the construct.<p>So, a static type system should be molded to fit the power of what it&#x27;s typing.<p>The fact that every Go programmer I talk to has something to say about their company&#x27;s boilerplate factory for getting around the lack of generics tells me something. This is only a matter of taste to a point. In mathematics there are a vast possibility of abstract concepts that could be studied, but very few are. It&#x27;s because there&#x27;s some difficult to grasp idea of what is good, <i>natural</i> mathematics. The same is in programming: there are a panoply of programming constructs that could be devised, but only some of them are worth investigating. Furthermore, for every programming construct you can think of there&#x27;s only going to be a relatively small set of <i>natural</i> type systems for it in the whole space of possible type systems.<p>Generics are a <i>natural</i> type system for interfaces. The idea that interfaces can be abstracted over certain constituents is powerful even if your compiler doesn&#x27;t support it. If it doesn&#x27;t, it just means that you have to write your own automated tools for working with generics. It&#x27;s not pretty.