3 ms·
This reminds me that the way Haskell/ghc implements/ed type classes, if I remember correctly, is not by instantiating them, but with a dictionary lookup[1], com
by juunpp 3y ago
This reminds me that the way Haskell/ghc implements/ed type classes, if I remember correctly, is not by instantiating them, but with a dictionary lookup[1], compiler tricks aside. I think that largely throws away the overhead of compiling template code... at the cost of the runtime overhead that C++ typically dislikes.
[1] https://stackoverflow.com/questions/12645254/ghc-code-generation-for-type-class-function-calls https://stackoverflow.com/questions/12645254/ghc-code-genera...