[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: funcnest and recursion

From: Dan Douglas
Subject: Re: funcnest and recursion
Date: Fri, 23 May 2014 09:41:01 -0500
User-agent: KMail/4.13 (Linux/3.14.0-pf3+; KDE/4.13.0; x86_64; ; )

On Friday, May 23, 2014 04:17:12 PM Ondrej Oprala wrote:
> Hi, there've recently been a few bug reports against bash on RH BZ,
> saying that bash can't handle infinite recursion the way zsh or ksh can.

They come up here at least a few times a year. E.g.

> Will funcnest_max be set to non-0 in upstream code in the future?
> Or is it just there for the downstream maintainers to set it if they
> see it fit?

It should be an end-user setting. It can be useful to have the ability to set 
a limit when testing certain things.

I'm sure you're familiar with the age-old controversy surrounding recursion 
limits in Python. Guido has long argued that the limit makes sense when 
implementations are not required to support TCO, thus making tail-recursive 
iteration a "language feature" that programmers can't not depend on.

I disagree with Guido, as do many others. Though all the same arguments apply 
in this case. I see no good reason for an arbitrary limit but I understand the 
opposing view.

Dan Douglas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]