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

Paul Boddie paul at boddie.org.uk
Wed Jul 4 14:59:57 EDT 2007


Paul Rubin wrote:
> Bruno Desthuilliers <bruno.42.desthuilliers at wtf.websiteburo.oops.com> writes:
> > Because static type checks impose a lot of arbitrary restrictions,
> > boilerplate code etc, which tends to make code more complicated than
> > it needs to be, which is a good way of introducing bugs that wouldn't
> > have existed without static type checks.
>
> Why do you say that?  By metrics and anecdotal evidence, Haskell code
> appears to be at least as compact as Python code.

I think Bruno is referring to another class of languages here.
However, it's interesting to consider the work that sometimes needs to
go in to specify data structures in some languages - thinking of ML
and friends, as opposed to Java and friends. 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.

Paul




More information about the Python-list mailing list