[Python-3000] duck typing
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon May 8 03:14:35 CEST 2006
Bill Janssen wrote:
> I think that there is little of advantage in the Java type system to
> be adopted into Python. One possible addition is the often-discussed
> optional type declarations and associated ability to define an
> interface for a module or class.
The problem with something like this being optional is
that a programmer too lazy to either implement a full dict
interface or document what he has implemented will also
likely be too lazy to bother using the optional interface
definition stuff.
And if it's *not* optional, duck typing goes out the
window completely, and you have Java.
--
Greg
More information about the Python-3000
mailing list