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

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


On Sun, Nov 29, 1998 at 05:42:44PM -0500, Tim Peters wrote:
> [Justus Pendleton]
> > It sounds like static typing might become less and less optional
> > as time goes on :-)
> 
> Oh yes -- but only if it proves to be *so* beneficial that people
> increasingly clamor for the benefits.  So it goes.  The flip side is that if
> it's as useless in practice as you expect it to be, people will ignore it
> and nothing will change.

Unfortunately (the main reason I really am bothering to argue against static
typing at all) I think that this viewpoint misses the fact that most people
who start programming in Python have been programming in other languages.
They bring the baggage of those languages with them.

When DoD Ada programmers start writing C++ code they wonder why C++ can't do
bounds checking for arrays.

When Visual Basic programmers start writing Java code they wonder why there
is no 'Variant' class.

Since most of the languages out there (especially the popular ones) use
static typing, people will use it in Python regardless of whether they need
to.  When they learned C they were taught they needed to give a type to every
variable....and when they write Python code they will continue to give it a
type without thinking of whether it really needs to be there.

-- 
Justus Pendleton <justus@acm.org>