Hash: SHA1

Dan Pozmanter wrote:

> Out of curiosity, I've noticed the word "evil" attached to patching
> of various and monkey kinds.  Not "bad", or "unwise", but "evil",
> implying a morality associated with the act.

The phrase encodes a bunch of folklore and geek sentiments in a
humourous ("half in fun but full earnest") meme:

  - Monkey patching can invalidate documented APIs and behavior;  in
    this sense, a monkey patch is "taking out a loan" which will be
    repaid later, either by the original perpetrator or by some other
    poor schmuck ("Vinny's crowbar *hurts*.")

  - A monkey patch is often a pure expedience:  "Rather than redo *my*
    software to correct a problem *I* injected, I'll just bash the base
    software to work around it."  In this mode, it is a sign of poor
    design or quality in the perpetrator's code.

  - Sometimes, a monkey patch is the only way to address a particular
    issue without updating the underlying software (most "hotfixes" for
    security issues involve monkey patching).  In this mode, the patch
    is a sign that the underlying software has a bug, hard-wired some
    policy that it shouldn't have, or is otherwise defective.

> What is morally wrong with modifying live objects in a dynamic language
> to achieve desired functionality?
> The idea is "I want to modify the zope core in a way that survives
> version to version, yet does not
> impose a specific use case on all zope users".

In general, the use case is fine;  we would prefer to address it by
making the core software more flexible / configurable, such that it is
not necessary to monkey patch.

- --
Tres Seaver                                   [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to