> On 11 Jun 2015, at 9:51 , PBKResearch <pe...@pbkresearch.co.uk> wrote:
> 
> I don’t quite understand Norbert’s comment. Does ‘monkey’ apply to me or to 
> what I have done? Either way, it seems unnecessary and abusive. 

It's a phrase to describe the change: http://en.wikipedia.org/wiki/Monkey_patch 
<http://en.wikipedia.org/wiki/Monkey_patch>
I think Ruby popularized it, the phrase I was familiar with in a Smalltalk 
context was "method override"

> Thanks to Sven’s careful use of informative method names, the effect of my 
> change is quite clear. Any comma in the value part of a query line will be 
> encoded. Nothing else. I did my best to trace any side effects, and didn’t 
> find any. What is not ‘reliable’ about that?
>  
> Peter Kenny

The problem with overrides of methods in an external librarey arise when:
- Other packages you load depend on the same method being monkey patched in a 
different way way.
- Bug fixes/Refactorings in the base library renders the change 
incorrect/obsolete, which can be hard to notice. *

Subclassing and adding your modifications there instead "solves" the first 
problem.
Reading the specs, determining the original behaviour is a bug, submitting a 
fix, and have it accepted in the base library instead fixes both.

Cheers,
Henry

* For instance, in my day job maintaining a VW application, when upgrading to 
new versions, verifying that all monkey patches are still correct accounts for 
a significant portion of the time spent

Reply via email to