&gt; What happens, especially with classes, is that you cannot guarantee that your type hierarchy will not be altered at the time you invoke your generic method (highly dynamic classes are a feature too).<p>In other words, the type system is unsound. Which is exactly as useful as having no type system at all.<p>But, anyway, what I asked for is (0) types parameterized by other types [e.g. &quot;dictionary mapping ints to strings&quot;] and (1) dispatch [e.g ither static or dynamic] on parameterized types. How would you solve this challenge? <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11592693" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11592693</a>