[Zope-dev] Zope 2.6 planning - call for contributors!

seb bacon seb@jamkit.com
04 Mar 2002 10:39:22 +0000


On Mon, 2002-03-04 at 03:47, Richard Jones wrote:
> On Mon, 4 Mar 2002 14:40, Casey Duncan wrote:
> > I agree, monkey patches are perfect for this. That
> > makes them totally transparent to the application and
> > Zope for that matter. There's nothing wrong with them
> > in the right application.
> 
> My main concern is the use of monkeypatching in the core makes it difficult 
> for someone else to release a product that also MPs without them worrying 
> about whether something has already patched code. Especially when we're 
> talking about MP'ing so many core Zope objects (yes, I count >1 as "so many" 
> :)

I agree - altering classes at runtime is less predictable or
discoverable than defining them statically.  I think the current
solution is really nice, but I don't see that it has any particular
benefits over a static implementation, which has the benefit of
following a standard, well-known pattern.

> I think the performance hit is really quite minimal for two if statements at 
> the entry and exit point(s) of a function to turn the behaviour on and off.

Yes - I would bet the performace difference is in the order of
hundredths of a second.

seb