On 01.05.2006 22:16, Christopher Nelson wrote: >> On 01.05.2006 19:48, Squee wrote: >>> I've always been a firm supporter of functors. They're just cleaner >>> (in my mind) than callback functions, especially when a way >> to easily >>> provide instance-specific data through the constructor. >> Sorry, you wouldn't get instance-specific data. The class >> methods would be static. > > Why?
If you ask "why would the methods be static": Well, in both "alternatives" you initially offered you use static functions/methods. If you ask "why wouldn't you get instance-specific data": Static methods are class methods. You can't access members of a specific instance. (You can access static members, but those aren't instance-specific data either.) -f.r.
signature.asc
Description: OpenPGP digital signature
