Functional programming in Python

S. Alexander Jacobson alex@shop.com
Fri, 25 May 2001 17:25:42 -0400 (Eastern Daylight Time)


On Fri, 25 May 2001, Zhanyong Wan wrote:
> As you explained, the parse of an expression depends the types of the
> sub-expressions, which imo is BAD.  Just consider type inference...

Ok, your complaint is that f a b c=a b c could have type
(a->b->c)->a->b->c or type (b->c)->(a->b)->a->c depending on the arguments
passed e.g. (f head (map +2) [3]) has different type from (f add 2 3).

Admittedly, this is different from how haskell type checks now.  I guess
the question is whether it is impossible to type check or whether it just
requires modification to the type checking algorithm.  Does anyone know?

-Alex-

___________________________________________________________________
S. Alexander Jacobson                   Shop.Com
1-646-638-2300 voice                    The Easiest Way To Shop (sm)