3 ms·
I don't think C++ has a dynamic multiple dispatch mechanism. You can craft one with the visitor pattern or some precompiling or macro sheanigans. I'd love to he
by vnorilo 8y ago
I don't think C++ has a dynamic multiple dispatch mechanism. You can craft one with the visitor pattern or some precompiling or macro sheanigans. I'd love to hear about the best way of doing it.
- geocar 8y agoNo. Not dynamic. The best way is to use Common Lisp. I don't know if there's consensus for other, lesser solutions. Stroustrup seems to think C++ just isn't good enough[1], but good ol' function overloading is good enough for the cases we're discussing. [1]: http://www.stroustrup.com/multimethods.pdf http://www.stroustrup.com/multimethods.pdf