[Python-Dev] proposal for interfaces

Alex Martelli aleax@aleax.it
Mon, 30 Sep 2002 09:35:34 +0200

On Sunday 29 September 2002 10:26 pm, John Williams wrote:
> Esteban U.C.. Castro wrote:
>  > I like it a lot! Anyway, if it can be implemented in python as is,
>  > what is the point of the PEP? Making the 'interface' root class and/or
>  > InterfaceError builtins, maybe?
> Well, aside from the ego boost of having my very own PEP, I think the
> nature of interfaces is such that they're vastly more useful if lots of
> people use them.  Putting something in the standard distribution almost
> guarantees that.

I'm not following all of the details (and I'm prejudiced by the mentioned
bias for static typing), but I'd like to second this specific point: some
features, and interfaces are definitely one, have growing usefulness for
all the more people use them.  This is what economists call "a network
effect" (if you're the only one in the world to own a phone, its usefulness
to you is nil; if there are just two phones in the world, each has at least
one bit of usefulness; the more people use phones, the more useful each
phone becomes to its user).  If most Python modules used interfaces (of
almost any given kind), those interfaces could be very useful; if almost no
module did, the usefulness would be limited to inter-module communication
for very complex systems one develops oneself -- not nil, but much less.