Who's minister of propaganda this week?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Mar 16 22:46:29 CET 2001


Thu, 15 Mar 2001 12:37:18 +0100, Alex Martelli <aleaxit at yahoo.com> pisze:

> More generally: we might erroneously pass to foo some object that
> does not even _implement_ First and Second methods with acceptable
> signatures, or some that _does_ implement the methods with signatures
> that appear good BUT not with the semantics that foo needs
[...]
> No compiler wards you at compile-time against all, or even _most_,
> errors of this very common kind.

This is not true. In statically typed languages I use most of my errors
(over 80%) are detected at compile time.

Most of them are type errors (e.g. mismatching the number of
arguments) or name binding errors (e.g. forgotten module imports or
using a parameter which is not present in this function after some
reorganization).

I sometimes pass an object which doesn't implement the right interface.
This is checked statically. I never pass an object which implements
a different interface under the same name (because interfaces are
not matched by method names but by interface identities).

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list