Path: ...!weretis.net!feeder6.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: fir Newsgroups: comp.lang.c Subject: Re: Recursion, Yo Date: Sun, 14 Apr 2024 20:34:28 +0200 Organization: i2pn2 (i2pn.org) Message-ID: References: <87edbestmg.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 14 Apr 2024 18:34:33 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="1178067"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 In-Reply-To: X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 1648 Lines: 13 bart wrote: > > That's not an interesting use of a local function! You can move square() > outside, and it would still work, putting aside any clashes with > existing names called 'square'. > > The challenges of local functions are to do with accessing transient > variables belonging to their enclosing function. Especially when a > reference to the local function is called from outside the lexical scope > of the enclosing function, with extra difficulties when the enclosing > function is no longer active. > very good point