Typed Python?

Michele Simionato michele.simionato at gmail.com
Sat Jul 10 04:02:21 EDT 2004


Ville Vainio <ville at spammers.com> wrote in message news:<du7eknmlsug.fsf at amadeus.cc.tut.fi>...
> >>>>> "Hamilcar" == Hamilcar Barca <hamilcar at tld.always.invalid> writes:
>  
>     >> Python supports recursion, second order functions, numerical
>     >> programming and hundreds of other important concepts.
> 
>     Hamilcar> How about currying and deferred list evaluation?
> 
> Deferred list evaluation:     generators

> Lazy evaluation in general:   lambda : f(1,2)

this does not work so well; missing a constructs such as Scheme "set!" and "let"
anseverely limitates certain programming paradigms which are natural in Scheme.
This is ok, anyway, since Python is not Scheme. But you cannot claim that
Python support for certain things is as good as in other languages (say
Scheme, Haskell, etc.)

> Currying:                     lambda x,y : f(x,y,1,2)

This is not currying. It is specializing arguments. Here is a reference about
specializing arguments in Scheme:
http://srfi.schemers.org/srfi-26/srfi-26.html

Haskell does real currying.


                Michele Simionato



More information about the Python-list mailing list