[Types-sig] Why I don't like static types in Python

Justus Pendleton Justus Pendleton <justus@acm.org>
Sun, 29 Nov 1998 21:24:05 -0500

[Justus Pendleton]
> > Hmmm...I'm not sure what the difference between looking up the
> > parameters in a manual versus looking up the parameters in a
> > prototype are.  Seems like they are exactly the same thing
> > except that the manual is far more likely to actually convey
> > some useful information...like what the hell "int *decpt" :-)

[Tim Peters]
> The most obvious difference is that a type mismatch between formal arguments
> in a prototype and actual arguments in a call can yield a compile-time error
> instead of (in C before prototypes) runtime insanity or (in Python) runtime
> TypeErrors.

[Fredrik Lundh]
> if you'd been a compiler, you would have known the difference...

As I thought had been clear from my original post, I had tried to break the
argument for static typing into its component parts.  One of those arguments
was "Static types improve readability by making the programmer's intentions
more explicit."  My comments about documentation being more useful than
prototypes were from that viewpoint.

I realize that I may not always have been very clear about which part of the
argument for static typing I was trying to address :-(, but I think that it
could be interesting and possibly informative to deconstruct the argument for
static typing and address the arguments one by one.  My reason for doing this
was to see if perhaps it wasn't the case that there isn't really a need for
static typing.

Justus Pendleton <justus@acm.org>