Static Typing in Python

Donn Cave donn at u.washington.edu
Mon Mar 15 12:30:31 EST 2004


In article <mailman.11.1079347355.12241.python-list at python.org>,
 Premshree Pillai <premshree_python at yahoo.co.in> wrote:
...
> Err...you probably have the wrong idea of static
> typing, I think. Static typing has to do with explicit
> declaration (initialization) of variables (and not of
> variable types). Like in C, C++, etc, Python too is
> strongly typed, i.e., variables are necessarily bound
> to a particular type.

Just a nit-picking annotation - static typing actually
does not require explicit declaration.  Some of very
strongl statically typed languages, mainly functional
languages like Haskell and ML, use type inference instead,
and programs written in those languages will generally
have declarations only to clarify or narrow the type of
an expression when it suits the programmer.

We now return you to our regularly scheduled debate over
whether Python's typing is "strong" or not, with the
observation that "strong" in "strongly statically typed"
apparently is not the same "strong" as in "strongly typed."
I guess it's fun to have something to wrangle over that
doesn't have any real consequence, but let's be clear about
that - "strongly typed" is a useless phrase.  It may be
correctly applied to Python, but only to someone who already
understands what is being communicated, so of no value to
anyone but language taxonomists.  Are you folks sure you
wouldn't rather talk about whether parameters are passed
by value or by reference?

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list