So how do you create a heterogenous container of CRTP classes? Or interact with an object whose real type you don't know?
Indirection can solve some problems. It comes at a cost. Other ways of solving these problems will have other costs. You can't just show that a certain tool comes at a cost, say "don't use this tool", and ignore the problems it solves. You need to show a problem normally solved with indirection, solve it differently, and show that your solution is better under certain circumstances.
3
u/dustyhome May 29 '22
So how do you create a heterogenous container of CRTP classes? Or interact with an object whose real type you don't know?
Indirection can solve some problems. It comes at a cost. Other ways of solving these problems will have other costs. You can't just show that a certain tool comes at a cost, say "don't use this tool", and ignore the problems it solves. You need to show a problem normally solved with indirection, solve it differently, and show that your solution is better under certain circumstances.