[Python-3000] Abilities / Interfaces
Phillip J. Eby
pje at telecommunity.com
Wed Nov 22 21:59:32 CET 2006
At 06:29 PM 11/22/2006 -0200, Gustavo Niemeyer wrote:
>Without interfaces, we won't be able to say "in all places, use the
>generic method registered for an IFruit whenever an Apple is seen".
...for some definition of "interface". :)
Dylan has "protocols", Haskell has "typeclasses", and they do what you're
describing. The term "interface" in this discussion has been heavily
linked to Java/Zope-style interfaces, however, as opposed to these other
styles of "interface". To be clear, I'm opposing a particular style most
commonly associated with the word "interface", *not* to the idea of having
some way to describe a multitude of types.
More information about the Python-3000