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: Taming The Switch-Statement
Date: Fri, 16 Oct 2026 14:22:46 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <86mrsdpcgp.fsf@linuxsc.com>
References: <119qf6l$2rmg3$1@dont-email.me> <11ac0mi$19kfd$1@dont-email.me> <11ac2jv$1a84t$1@dont-email.me> <11ac783$1bkuo$1@kst.eternal-september.org> <11ad5eq$1l8hg$1@dont-email.me> <11ad9fg$cjm0$4@dont-email.me> <11addhr$1oakb$1@dont-email.me> <11aduuk$cjlv$1@dont-email.me> <20261010220212.000063fd@yahoo.com> <11ae56o$cjlv$4@dont-email.me> <20261010230355.00005189@yahoo.com> <11ae7eb$cjlv$6@dont-email.me> <11aeee0$24k8m$1@kst.eternal-september.org> <11aer17$286ml$2@dont-email.me> <11aeusp$29hmu$2@kst.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 16 Oct 2026 21:22:47 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="3859343"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pM5YqBfdA5+37UgAEfodydjrZGfwLCcM="; posting-host="6aa7975ca949d05eced06ab246205481"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:6uDV3sH46hYJxH9PC5q0kqMFz8E= sha1:sa/xsoqm6e1RSvPMXW2R/plzEWw= sha256:3UJnrf2GqxLngfEYeUOxoD69Kt9B2NVKbNsV9wgurKU= sha1:hP3oo8mziQ35gbSuoXuuK5so+zY= sha256:ONfy5mXfIQXnC5CdIJWeAJ92HELIRjjHyXLUBLs3VK8=
Xref: csiph.com comp.lang.c:403221
Keith Thompson writes:
> I find "break NAME;", where "NAME" is the name of an enclosing
> construct, unambiguously better than "break N;", where N is the
> number of levels to break out of. [...]
Definitely.
> There's a proposal for C2y to use goto labels as loop names, and a
> competing one to define a new syntax like "for NAME (;;)" :
>
> https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm
> https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3377.pdf
I'm not particularly a fan of multi-level break/continue. But if
we're going to have one of these, the second ("for NAME (;;)") is
unquestionably better.