James Britt wrote:
> Hal Fulton wrote:
>> dblack / wobblini.net wrote:
>>
>>>
>>> I don't know whether it qualifies as "monkeypatching" (I always
>>> thought that meant doing something sloppy and ill-advised, which I
>>> hope I'm not :-) but see if this helps:
>>
>>
>> Actually it was only last week that I first saw this term
>> being used in the Ruby community. I wonder if it's too
>> late to squash it?
>
> Let's hope not.
>
> I believe it comes from the Python community. Python (I think) allows 
> for something similar to Ruby's ability to modify any and all classes, 
> but my (limited) understanding is that there are enough differences 
> between the two that what is reasonable and proper in Ruby is not 
> quite so elegant or appropriate in Python.  The term may be correct 
> for Python, but in Ruby this is just a normal and correct way to use 
> the language.
>
>
> The use of the term indicates unease with, and lack of understanding 
> of, Ruby on the part of the speaker, rather than describing anything 
> about Ruby.
>
Not necessarily. For me, the term "monkeypatch" establishes a 
distinction between a patch that adds functionality in a totally benign 
way, and a patch that changes the behavior of existing functionality 
using (meta)programming techniques. Because a monkeypatch, if not 
carefully considered, can put the main codebase into a state that causes 
other monkeypatches to be buggy (or worse), it is useful to be able to 
put a finger on the technique and teach the best practices that go along 
with it. Perhaps the term "monkeypatch" has bad connotations for some, 
but it seems to be undergoing a reclamation (for instance, the wikipedia 
entry does not have a negative connotation). For Pythonistas, 
monkeypatching may be ill advised; for Rubyists it is normal, but can 
cause such side effects as to be quite dangerous. By naming it, we can 
better control it.

Tom

-- 
Tom Werner
Helmets to Hardhats
Software Developer
tom / helmetstohardhats.org
www.helmetstohardhats.org