Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" Newsgroups: comp.lang.c Subject: Re: filling area by color atack safety Date: Sat, 16 Mar 2024 13:29:26 -0700 Organization: A noiseless patient Spider Lines: 33 Message-ID: References: <87wmq2jn7s.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 16 Mar 2024 20:29:27 -0000 (UTC) Injection-Info: dont-email.me; posting-host="ecbf074eed964d26a0e1ee52fa577a26"; logging-data="3234878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19r0DDdfmh9dy/C3h43qweIkal1BzaJUIU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:4PaAmeW8SkGy7WYtACyB1m4dQhQ= Content-Language: en-US In-Reply-To: Bytes: 2411 On 3/16/2024 1:02 PM, Malcolm McLean wrote: > On 16/03/2024 18:21, Scott Lurndal wrote: >> Malcolm McLean writes: >>> On 16/03/2024 13:55, Ben Bacarisse wrote: >>>> Malcolm McLean writes: >>>> >>>>> Recursion make programs harder to reason about and prove correct. >>>> >>>> Are you prepared to offer any evidence to support this astonishing >>>> statement or can we just assume it's another Malcolmism? >>>> >>> >>> Example given. A recursive algorithm which is hard to reason about and >> >> Perhaps hard for _you_ to reason about.  That doesn't >> generalize to every other programmer that might read that >> code. >> >> > From experience this one blows the stack, but not always. Sometimes > it's OK to use. Blowing the stack is not good at all. However, sometimes, I consider a recursive algorithm easier to understand. So, I build it first... Get it working, _then_ think about an iterative solution... > > Since you can reason about it so easily, you can tell the others when > you're OK and when you are not, in a handy intuitive way so that someone > thinking of implementing it will know. >