[Python-3000] Traits/roles instead of ABCs (original) (raw)

Bill Janssen janssen at parc.com
Tue May 1 18:42:43 CEST 2007


To me, interfaces and/or generic functions strike the right balance.

I agree. As I've said before, if this was 1994 I think I'd be in the PJE camp and prefer generic functions. As it is, I think interfaces better fit the current state of Python. And I think the existing type system has everything that's needed to indicate interfaces. All we need are some base definitions to stand on (dict, sequence, file, etc.).

Such tools are completely invisible for Python programmers who don't =20 care about them (the vast majority). They're also essential for a =20 very small subclass of very important Python applications.

Yep, those of us who write very large Python applications.

If ABCs can walk that same tightrope of utility and invisibility, =20 then maybe they'll successfully fill that niche.

I'm sure they will.

Bill



More information about the Python-3000 mailing list