Python and generic programming
olli at haluter.fromme.com
Fri Oct 22 13:31:29 CEST 2004
Steven Bethard <steven.bethard at gmail.com> wrote:
> Jeremy Bowers <jerf <at> jerf.org> writes:
> > (This was one of the things that
> > finally broke me of the strong typing inculcation I received in school;
> > strong typing, considered as a scientific theory (something like "Large
> > programs must be strongly typed, or they will cease working and
> > maintenance will become impossible"), made claims about programs that
> > proved to be wrong.
> You probably meant "static typing" throughout this email when you said "strong
> typing". Python *is* strongly typed -- you can tell the type of any object at
> runtime. Python is not statically typed -- any name can be bound to any type
> of object, so nothing is checked at "compile time".
Type checking at compile time does _not_ necessarily require
For a counter example, look at O'Caml. It is a dynamically
typed functional language (using type inference, pattern
matchingetc.) with compile-time type checking.
If there was a programming language with Python-like syntax
and library, dynamically typed, and type-checked at compile-
time, I'd run over to it immediately. :-)
Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany
``All that we see or seem is just a dream within a dream.''
(E. A. Poe)
More information about the Python-list