Deutsch English Français Italiano |
<20240524114224.000076e2@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S <already5chosen@yahoo.com> Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions - why so conservative? Date: Fri, 24 May 2024 11:42:24 +0300 Organization: A noiseless patient Spider Lines: 38 Message-ID: <20240524114224.000076e2@yahoo.com> References: <v2l828$18v7f$1@dont-email.me> <20240523171911.00002f5a@yahoo.com> <v2o7re$1tlge$1@dont-email.me> <20240524003424.0000590a@yahoo.com> <v2op72$2017t$3@dont-email.me> <v2p94a$26km6$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Fri, 24 May 2024 10:42:31 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1fee8cf0e42f956136de9de1398c0c93"; logging-data="2368577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yDcXB5MoCaxDpUQjaQfGpkZ/uPPGmVbg=" Cancel-Lock: sha1:vc6KqUVDRq6H4UhFWlQc9zVYjhY= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 2639 On Fri, 24 May 2024 06:38:18 +0100 Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote: > On 24/05/2024 02:06, Lawrence D'Oliveiro wrote: > > On Fri, 24 May 2024 00:34:24 +0300, Michael S wrote: > > > >> On Thu, 23 May 2024 22:10:22 +0200 David Brown > >> <david.brown@hesbynett.no> wrote: > >> > >>> What program control construct would you like? > >>> > >> Ability to break from nested loops. > > > > At least 90% of the time, when I want to exit from an inner loop in > > C, there will be some kind of cleanup I need to do in the outer > > loop before that can exit too. So the ability to jump straight out > > will rarely be used. > > goto gives you the functionality you require. > Sure, me too. Because that's what I have. If they hadn't given me {, }, else, while, for, and do then I would use goto to simulate all those as well. It gives functionality I require, don't it? > I usually use goto for handling malloc() failures. So if an > allocation fails within a deeply nested loop, I will jump to code at > the end of the function, free up amy half-constructed objects, and > return an error condition. > I do similar thing too, but that's just a habit that I can't overcome. It has no practical sense in environments that I work today. I could just as well return immediately, without cleaning up, it would have zero practical difference except that my code would be shorter and will look cleaner.