Static Typing in Python

Jacek Generowicz jacek.generowicz at cern.ch
Fri Mar 19 03:40:11 EST 2004


Donn Cave <donn at u.washington.edu> writes:

> Speaking of which, Haskell's type system supports type classes
> like Num (number), where Int and Float are instances of Num
> that implement its "+" function.

This is pretty much what you'd do in OCaml too, I believe.

> I'm probably leaving out a paragraph or two of the interesting
> parts, but the end result is that 1.5 + 1 works.  Haskell is not
> weakly typed.

But the point is that the programmer conrols whether the automatic
conversion is done or not. In weakly typed languages you get the
conversion whether you want it or not.



More information about the Python-list mailing list