It has nothing to do with garbage collection. I could&#x27;ve used GHC Haskell with sufficient extensions (MultiParamTypeClasses, FlexibleInstances, perhaps UndecidableInstances too) enabled as an example, instead of C++.<p>The point is that C++ has a much richer type structure on which you can dispatch.