[Python-3000] PEP 3100 Comments
Bill Janssen
janssen at parc.com
Tue May 9 18:35:55 CEST 2006
Phillip Eby writes:
> In Haskell, interfaces are defined using "typeclasses". A typeclass is
> basically a collection of generic functions. For example, you could define
> ...
> Further, Haskell has a concept of "typeclass instances" which basically
> give you adaptation. For example, suppose I have some generic functions
Thanks, Phillip. That's essentially what I'm talking about with CL
mixins, as well (though instead of typeclass instances you usually
have mixin implementations which are "mixed" into the class which
wishes to provide the interface, to give it the methods). That's what
I think Py3K should be using, too, instead of "duck typing", which for
some reason has come to be thought of (wrongly) as a "feature".
Bill
More information about the Python-3000
mailing list