Thomas Lotze wrote:
> Chris McDonough wrote:
> 
>> I'll throw out the obvious...
>>
>> Why not subclass Interface in zope.component and make the required API
>> additions there?  If it were anybody but us thinking about doing this,
>> they'd probably just subclass.
> 
> Because then, if you use third-party code that uses
> zope.interface.Interface and other code (third-party or your own) that
> uses the subclassed interfaces, you'll have to deal with both types at the
> same time in your client code. You could use the new API on some
> interfaces but not on others, possibly on the same line of code. How
> readable or maintainable would such code be?

I'm not sure, but if we had it to do all over again, this would be an obvious 
solution.  It would be the work of maybe two days to convert all "ZTK" packages 
to use a z.c.interface.Interface, and any existing package would need to be 
touched anyway to use .adapt and .utility.  So it bears some weight I think, 
even if it is eventually rejected.

- C

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

Reply via email to