Deutsch English Français Italiano |
<utd392$2e30d$1@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder6.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: fir <fir@grunge.pl> Newsgroups: comp.lang.c Subject: Re: filling area by color atack safety Date: Tue, 19 Mar 2024 23:23:48 +0100 Organization: i2pn2 (i2pn.org) Message-ID: <utd392$2e30d$1@i2pn2.org> References: <ut3669$21eur$1@i2pn2.org> <ut4020$2s8ov$1@dont-email.me> <87wmq2jn7s.fsf@bsb.me.uk> <ut4ba7$2uits$1@dont-email.me> <SqlJN.144025$CYpe.59290@fx40.iad> <ut4tsj$3291j$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 19 Mar 2024 22:23:30 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="2558989"; 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: <ut4tsj$3291j$1@dont-email.me> X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 3182 Lines: 45 Malcolm McLean wrote: > On 16/03/2024 18:21, Scott Lurndal wrote: >> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: >>> On 16/03/2024 13:55, Ben Bacarisse wrote: >>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> 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. > > 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. > from "effective c" or maybe i call it "optimal" point of view recursion as it is implementeded in c is wrong (it is sub-optimel) so i agree with that statement - hovever a big dose of world today programs in a non optimal way (for example whole that python ond other programing ways is non optimal)..and thus te recursion may be found one way ...and i must say whan i way younger i was much more hardfixed to optimal coding..today i almost no code at all and lost a interest (i mean "being interested") in many things ..i also consider that non optimal cases more interesting - and generallt this recursion would be standable - especialy if for example windows has this "guard page" some exception based mechanism that would allow to resize stack up its default two megabytes (which is a bit small size as for today) instead of crashing application im not sure hovever if its done and if its posoble as i understand there is exception when tryibgf to read write immediatelly after stack reserve but not quite if someone just moves up stack pointer (like when allocating stack space for array) but those machanisms could be handy