But how does the "this" passing complicate inheritance? If an inherited object instance is used then that one will also be passed on, which seems like the right thing to me.
It's the wrong thing to do when the dependency is to a program dumped with another codec, such as a module dumped by the pike installer. The choice must be made on a program-by-program basis.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2004-07-04 14:37: Subject: Re: Warnings from startup script
It's a bit ugly that it passes "this" in any of those cases since it's a codec and not a compilation handler. I'm not sure why it does that. Maybe it's to ensure that the __register_new_program callback can be called later on, but that's done through the codec object anyway. So I'd say the "this" passing should go away in the 'p', 'f' and 'o' cases instead.
One thing that perhaps should be done there is to add a compilation handler slot to the codec, so that one can be instantiated with a specific handler that it will pass on in those cases. I.e. so that the handler in effect in low_findprog also will be used in later resolv/findmodule/etc calls from the codec.
But how does the "this" passing complicate inheritance? If an inherited object instance is used then that one will also be passed on, which seems like the right thing to me.
/ Martin Stjernholm, Roxen IS