Optional Static Typing - Haskell?

Michael Hobbs mike at hobbshouse.org
Mon Dec 27 18:10:36 CET 2004

Neal D. Becker <ndbecker2 at verizon.net> wrote:
> I've just started learning about Haskell.  I suggest looking at this for an
> example.
> A good intro: http://www.haskell.org/tutorial

I've always found that with Haskell, if I can get my program to
compile without error, it usually runs flawlessly. (Except for the
occasional off-by-one error. :-) I don't know if that's due to the
fact that Haskell enforces pure functional programming, or if it's
due to Haskell's strict static typing, or the combination of the
two. But if anyone ever demanded that I wrote code that absolutely 
positively has to work, no matter the cost, I would probably choose

Tying Haskell back to Python, if static type checking ever is 
grafted on to Python, I would propose that it uses type inference,
a la Haskell or O'Caml, and raise an Error only when it detects a
truly unmistakable type error. This may be easier said than done,
however, given Python's dynamic nature. For example, a class's
method may be re-bound to any other function at runtime, which would
wreak havoc on any static type checker.

- Mike

More information about the Python-list mailing list