On Jul 18, 2005, at 10:30 AM, Andrew Yochum wrote:
> On Jul 18, 2005, at 10:15 AM, George Schlossnagle wrote:
>
>
>> Drop-in replacements are evil. If you want to do this, you should
>> just create a new function that does what you need to do and name
>> it differently. If you're dead-set on doing a name-based
>> replacement, then you should have your extension modify the symbol
>> table directly, but again, this is evil.
>>
>> George
>>
>
> George,
>
> Can you please substantiate your statement that drop-in
> replacements are evil?
>
> I could only see them being a problem if they don't fully implement
> the existing API.
Sure. They inevitably will have differing behaviors (if not, why not
just have a single unified function). Given that, you'll have
different behaviors on different machines in a way that is not
terribly transparent to end-users. That's evil.
Not that there's anything wrong with being evil from time to time.
That's the reason that apd had a replace_function call for mucking
with the symbol table. But that's something that should be done
locally.
George