[Python-3000] why interfaces shouldn't be trusted

Terry Reedy tjreedy at udel.edu
Thu May 11 07:31:08 CEST 2006


"Guido van Rossum" <guido at python.org> wrote in message 
news:ca471dc20605102200n1ab41e6dp19b88b8c7c2b29b2 at mail.gmail.com...
> You seem to be still under the influence of the type-safety mafia, who
> want to make you believe that with enough type-checking you can
> prevent all bugs (though they don't believe it themselves).
>
> Python already has a very useful kind of strong type safety: it tags
> all data at the lowest level so it won't be interpreted the wrong way;
> in particular it can't be tricked into dereferencing something that's
> not a pointer to an object, or calling something that's not a pointer
> to a well-behaved function. (Extensions like ctypes excluded.) Java
> makes a similar guarantee. C++ and Perl don't.

Nicely explained.  I think this paragraph should go in the tutorial if not 
already.

tjr





More information about the Python-3000 mailing list