Python and generic programming

Oliver Fromme olli at haluter.fromme.com
Fri Oct 22 07:31:29 EDT 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
static typing.

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.  :-)

Best regards
   Oliver

-- 
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 mailing list