PEP 3107 and stronger typing (note: probably a newbie question)

John Nagle nagle at
Wed Jul 4 21:25:33 CEST 2007

Paul Boddie wrote:
> Paul Rubin wrote:
> The campaign for optional
> static typing in Python rapidly became bogged down in this matter,
> fearing that any resulting specification for type information might
> not be the right combination of flexible and powerful to fit in with
> the rest of the language, and that's how we really ended up with PEP
> 3107: make the semantics vague and pretend it has nothing to do with
> types, thus avoiding the issue completely.

     Unfortunately, that may lead to the worst of both worlds.

     If you think enforced static typing is painful, try maintaining code with
non-enforced static typing.  You can't rely on the type information, and
inevitably some of it will be wrong.  You can't tell by looking which
is wrong, of course.

     This has been tried.  Original K&R C had non-enforced static typing.
All "struct" pointers were equivalent.  It wasn't pretty.

     It takes strict programmer discipline to make non-enforced static
typing work.  I've seen it work in an aerospace company, but the Python
crowd probably doesn't want that level of engineering discipline.
Non-enforced static typing requires a quality assurance group that
reads code and checks coding standards.

				John Nagle

More information about the Python-list mailing list