can Python be useful as functional?

Grant Edwards grante at visi.com
Tue Sep 18 12:51:43 EDT 2007


On 2007-09-18, Steve Holden <steve at holdenweb.com> wrote:
> Lorenzo Stella wrote:
> [...]
>>
>> My question is: how can we call a language "functional" if
>> it's major implementation has a limited stack? Or is my code
>> wrong?
>
> So, which environment do you habitually use that provides an
> *unlimited* stack?

Perhaps Lorenzo Stella is referring to Python's lack of
tail-recursion optimization?  There are languages that
guarantee unlimited tail-recursion with a limited stack.

That's a typical feature for a function language, right?

> You just don't like the specific limit that Python imposes. So
> increase it with sys.setrecursionlimit().

-- 
Grant Edwards                   grante             Yow! I hope I bought the
                                  at               right relish ... zzzzzzzzz
                               visi.com            ...



More information about the Python-list mailing list