🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #547

Re: Taming The Switch-Statement

#547
From: Janis Papanagnou
Date: Mon, 19 Oct 2026 13:16
34 lines
3105 bytes
On 2026-10-18 21:09, David Brown wrote:
> On 18/10/2026 18:09, bart wrote:
>> [...]
[ declaration syntax ]

(I just want to comment on a [not unimportant] detail...)

> 
> You need to give things in the right order, or use parentheses, to get 
> the right "type expression".  It's just like any other kind of expression.
> 
> The intention of the declaration syntax in C is that the declaration 
> order follows usage.  [...]

I think the first part is downplaying that languages typically indeed
make a distinction between parenthesized expressions and declarations.
Quite some other languages [not from the C-heritage] that I used all
did not need to introduce "expression"-grouping for _declarations_ in
the first place given their more consistent ways to declare entities.

The second part is, as I had understood C's history, the idea behind
how it got defined; needless to say that I think that was a bad idea.
But that's what we've got! If they had dropped that requirement/idea
the declaration syntax could have become "better" (more consistent,
less cryptic, less convoluted, clearer). Now, after half a century,
we just have to live with that, and folks who have "problems" with it
should better not touch this language (or maybe not doing programming
at all). The somewhat tragic aspect is that the "declaration follows
use" idea was (IIRC) intended to _simplify_ the understanding of its
concepts and use of the language; the consequences were seemingly not
valued correctly.

Janis
Technical Details
Message-ID: <11b557o$1kr9u$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <119qf6l$2rmg3$1@dont-email.me> <11arjmc$2qid7$1@dont-email.me> <11at5vi$5vu$1@reader2.panix.com> <11auad0$3no1k$1@dont-email.me> <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me> <11b2a6d$131h6$1@dont-email.me> <11b2hr6$15thq$1@dont-email.me> <11b2l06$16mof$1@dont-email.me> <11b2qv0$19h68$1@dont-email.me> <11b35gt$1cn63$2@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Mon, 19 Oct 2026 15:16:40 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <11b557o$1kr9u$1@dont-email.me>
References: <119qf6l$2rmg3$1@dont-email.me> <11arjmc$2qid7$1@dont-email.me>
 <11at5vi$5vu$1@reader2.panix.com> <11auad0$3no1k$1@dont-email.me>
 <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me>
 <11b2a6d$131h6$1@dont-email.me> <11b2hr6$15thq$1@dont-email.me>
 <11b2l06$16mof$1@dont-email.me> <11b2qv0$19h68$1@dont-email.me>
 <11b35gt$1cn63$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Oct 2026 13:16:41 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1731902"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18L8lbnMEHu1OpJW3u7wNMs"; posting-host="9a1787de1638a6d9f83c958712c1b12a"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NBE3/MP1Ro8Wzv0WjbUqSIKZdxU= sha256:Qx5W5xO0SkDtam6j4Mi3o2+FyqJkq9ZvseeJX2HnvKo=
	sha1:0eljEcMGIe16KDHGFPinlqY/4RA= sha256:JSpRoq/3f88jNElo7tW1M/Mi+lLvnflyKfrQfABLDS4=
In-Reply-To: <11b35gt$1cn63$2@dont-email.me>
Content-Language: en-US