True. But I still wouldn't call it proper multiple dispatch since it isn't possible to _not_ dispatch on the implicit first argument, i.e. this_object().
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-17 21:30: Subject: Re: float type weirdness
That's typically called function overloading. Grubba has made some work on adding that to Pike with the variant modifier, but it doesn't work well yet. What it would do in Pike is simply to join the different functions to one that does the necessary runtime type checks to execute the right variant. C++ can do it better since it resolves the right variant already at compile time.
Which is better is of course a matter of what you're trying to achieve. What you describe sounds like multiple dispatch, i.e. a->f(b) will dispatch polymorphically on both a and b, which is something C++ does not have.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)