in reply to Re: Be grateful for Perl OO
in thread Be grateful for Perl OO

Yes, functors created using templates would help a lot. See Modern C++ Design for some amazing things you can do with C++ templates.

Update: The basic idea is using a templated function like this:

template <class Type> double doCall(Type *instance, double (Type::*pmf)()) { return (instance->*pmf)(); }
Update 1/19/03: Transposed the return type to the proper place in the declaration. Thanks to John M. Dlugosz.