| Deutsch English Français Italiano |
|
<20241220152722.00000327@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!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: goto considered helpful (Was: question about linker) Date: Fri, 20 Dec 2024 15:27:22 +0200 Organization: A noiseless patient Spider Lines: 57 Message-ID: <20241220152722.00000327@yahoo.com> References: <vj1bss$325uo$1@dont-email.me> <vj1h4i$335q1$2@dont-email.me> <vj1mhi$34p7h$1@dont-email.me> <vj1prj$35je4$1@dont-email.me> <vj7dup$he7i$1@dont-email.me> <vjasuj$17uod$1@dont-email.me> <vjc87h$1apid$1@paganini.bofh.team> <vjcbe1$1jns0$1@dont-email.me> <87wmg5x4b1.fsf@nosuchdomain.example.com> <vjd96b$1pbed$1@dont-email.me> <87jzc5wx3s.fsf@nosuchdomain.example.com> <vjdde8$1q2to$2@dont-email.me> <87frmtwuzq.fsf@nosuchdomain.example.com> <20241212144454.00003b83@yahoo.com> <aqpamjh4h4kmu34ilbe5bnsiq4o7llso06@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Fri, 20 Dec 2024 14:27:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="cd72757de727eb0edb19146209da36f1"; logging-data="3577881"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1873AfjqH6TuuQgs9RiGwYKBZE/+3RAYJs=" Cancel-Lock: sha1:/lES8QQ7UQXYpKyMtjQkxAPogsA= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 3450 On Fri, 20 Dec 2024 13:52:13 +0100 Rosario19 <Ros@invalid.invalid> wrote: > On Thu, 12 Dec 2024 14:44:54 +0200, Michael S wrote: > >On Wed, 11 Dec 2024 17:27:53 -0800 > >Keith Thompson > wrote: > > > >> bart > writes: > >> [...] > >> > My experience of multi-level break is that there are two main > >> > use-cases: > >> > > >> > * Used in the current loop only (not necessarily the innermost > >> > to an observer). This is the most common > >> > > >> > * Used to exit the outermost loop > >> > > >> > So to support these, named or even numbered loops are not > >> > necessary. (Eg. I use 'exit' or 'exit all'.) > >> > >> I would oppose a change to C that only applied to innermost and > >> outermost loops. For one thing, I'm not aware of any other > >> language that does this (except perhaps your unnamed one). For > >> another, it's easy enough to define a feature that handles any > >> arbitrary nesting levels, by applying names (labels) to loops. > >> > > > >The better solution is education. > >Convince teachers in unis and colleges that goto is *not* considered > >harmful for this particular use case. Convince them to teach that > > goto is not harmful in every case, if the people that write it, indent > that goto significally and have clear in mind and in the text, what > that goto has to do > I don't agree. Many sorts of goto are hard to understand for the reader even when they are crystal clear to the writer [at the moment of writing]. That applies to nearly all forward gotos into block and to nearly all backward gotos. That is, there exists one sort of backward goto that I find sufficiently understandable, but right now I am unable to formalize its exact properties. At large, Dijkstra is more right than wrong. Of course, nothing of said above is relevant in context of gotos that exit inner loops.