I read many article about how to implement multimethod in c++:
why there are no multimethod in c++?
why do not they get supported by c++ standard?
Just because it could be done doesn't mean it's a problem that it wasn't done. One criticism of C++ is along the lines of "Stroustrup took everything anyone had heard of, and tried to include it."
Plus, as Raymond Chen says, "Every feature starts off with -100 points." That is, before you ask why C++ doesn't have these things, you should explain in detail why it needs them. Otherwise your feature stays in negative territory, due to the costs associated with it.
Straight from the horse's mouth:
"I rejected multi-methods with regret, because I liked the idea, but couldn't find an acceptable form under which to accept it."
Bjarne Stroustrup, The Design and Evolution of C++ (p297)
And later:
"Multi-methods is one of the interesting what-ifs of C++. Could I have designed and implemented them well enough at the time? [...] What other work might have been left undone to provide the time to design and implement multi-methods?"
(p298f)
In general, whenever you feel the urge to know why some particular C++ feature was implemented, or was not implemented, or was implemented the way it is now, and if that feature pre-dates the standardization, you want to read D&E.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With