[Python-Dev] PEP 246, redux
Alex Martelli
aleax at aleax.it
Tue Jan 11 11:01:29 CET 2005
On 2005 Jan 10, at 18:59, Phillip J. Eby wrote:
> At 12:43 PM 1/10/05 -0500, Phillip J. Eby wrote:
>> As a practical matter, all of the existing interface systems (Zope,
>> PyProtocols, and even the defunct Twisted implementation) treat
>> interface inheritance as guaranteeing substitutability for the base
>> interface, and do so transitively.
>
> An additional data point, by the way: the Eclipse Java IDE has an
> adaptation system that works very much like PEP 246 does, and it
> appears that in a future release they intend to support automatic
> adapter transitivity, so as to avoid requiring each provider of an
> interface to "provide O(n^2) adapters when writing the nth version of
> an interface." IOW, their current release is transitive only for
> interface inheritance ala Zope or Twisted; their future release will
> be transitive for adapter chains ala PyProtocols.
This is definitely relevant prior art, so thanks for pointing it out.
If interfaces change so often that 'n' can become worryingly high, this
is a valid concern. In my world, though, published interfaces do NOT
change as often as to require such remedies;-).
Alex
More information about the Python-Dev
mailing list