Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: switch/extension for see below strongly needed Date: Sat, 23 May 2026 21:12:35 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: <86ldd9fnt8.fsf@linuxsc.com> References: <10uapjs$19723$1@dont-email.me> <10uifdl$3gs6h$1@dont-email.me> <10uijv9$3i6dl$1@dont-email.me> <10ujm3r$3pnbb$1@dont-email.me> <10ukjc1$edm$1@reader1.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 24 May 2026 04:12:37 +0000 (UTC) Injection-Info: dont-email.me; logging-data="298949"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5ukUPPCEtOUovA5vR9rDWlPof4XkC98Y="; posting-host="b5598a003ee62daee138155580deb387" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:ghw1yxtjEmZ25dpnZI3NriV/360= sha1:xiFdY9lliPOJhGT44xCLNAtrHsI= sha256:ZWXe9S5wMDX5IsPeXYgl+qnXo7moPeKpdnIjmlzlFi8= sha1:1aJy741MuBZjYuejE5GMSSNhSf4= Xref: csiph.com comp.lang.c:399383 cross@spitfire.i.gajendra.net (Dan Cross) writes: > In article <10ujm3r$3pnbb$1@dont-email.me>, > David Brown wrote: > >> [snip] I have almost never had need of "goto" or labels (excluding >> switch case labels, of course), and don't expect ever to do so in the >> future. > > While I generally try to avoid it, there are times (in C in > particular) when it really is the right tool; [...] Yes. > Breaking out of nested loops without a lot of unnecessary > ceremony is sort of an obvious example; [...] Another scenario where using goto can be attractive is when so-called "loop and a half" processing is needed. Something like this goto ENTRY; do { .... ENTRY: .... } while( ..condition.. ); is in many cases more attractive than goto-less alternatives.