🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #469

Re: Taming The Switch-Statement

#469
From: Janis Papanagnou
Date: Sat, 17 Oct 2026 13:15
61 lines
3837 bytes
On 2026-10-17 13:09, Kenny McCormack wrote:
> In article <11audde$3oci5$1@kst.eternal-september.org>,
> Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
>> bart <bc@freeuk.com> writes:
>> [...]
>>> What's often stated also is how successful C has been, but that
>>> doesn't magically make the syntax wonderful.
>>
>> NOBODY THINKS C'S SYNTAX IS WONDERFUL.
> 
> The funny thing is: I actually do.

Hah! - That's the touche when someone formulates generalizing
statements about "all people" or about "nobody". :-)

That said; I'd anyway never expected anyone to have chosen the
attribute "wonderful", though (which was the word used here).

But I also think that what Keith wanted to say was that "nobody
has *said* - before your post - that C's syntax is wonderful"
(in reply to bart's typical wrong imputations and hallucinations
what others would have implied by some [unrelated] statement).

> ['switch' topic - snipped]
> ["if (a = b)" topic - snipped]
> 
> FWIW, to take another popular whipping boy of C, I also actually like the
> variable declaration syntax -

(I'm reading that as "declaration syntax", i.e. without "variable".)

> which many people like to criticize as
> "backwards" or "inside out".  Once you get used to it, it makes perfect
> sense (to me, anyway).  [...]

But isn't that exactly the point, that you need to "get used"
to something, which makes it appear as a "bad" design decision
to others. (I certainly got used to many things in life, but
some I then just try to avoid.)

And of course "it makes sense"; if you can formally describe it -
and programming language syntaxes have that property - it makes
sense. Is it a "good" (or even a "wonderful") design? - I don't
think so. YMMV.

I like some of the programming-idioms that "C" made popular, but
its syntax - and specifically that convoluted declaration syntax -
is certainly not amongst them. (Or requiring 'typedef' workarounds
to make some of the less-trivial declarations manageable and the
code significantly better readable.)

We can observe that if one spent a lot time in some context, and
is used to it, and at some point even masters it, he might not be
considering it as negative as someone who is more of a wanderer
between worlds, for whom the advantages and disadvantages of the
worlds might be more obvious. - And all those hypes...

Oh! - I just noticed I'm digressing.

Janis
Technical Details
Message-ID: <11avse9$3pvda$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> <11at5vi$5vu$1@reader2.panix.com> <11auad0$3no1k$1@dont-email.me> <11audde$3oci5$1@kst.eternal-september.org> <11avl11$poq2$1@news.xmission.com>

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: Sat, 17 Oct 2026 15:15:53 +0200
Organization: A noiseless patient Spider
Lines: 61
Message-ID: <11avse9$3pvda$1@dont-email.me>
References: <119qf6l$2rmg3$1@dont-email.me> <11at5vi$5vu$1@reader2.panix.com>
 <11auad0$3no1k$1@dont-email.me> <11audde$3oci5$1@kst.eternal-september.org>
 <11avl11$poq2$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 17 Oct 2026 13:15:54 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3997098"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+VpwnK1JpTYiMpNF1VGGZ9"; posting-host="260a9fd6479032e5e4be87bbb3c186b4"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SCNc+3tmYLCBxazvFhposw+/mHs= sha256:FWmAGFv7fM1ilSTFEhrPEstyoNMCUAhls8Rnit7HhUM=
	sha1:LodoPlgKxwGCFCAhyb7AGySeAMI= sha256:YU/4vTsdsUFG5r4ic80ZLEi1niQmZbtAZbnKCHEk1Og=
In-Reply-To: <11avl11$poq2$1@news.xmission.com>
Content-Language: en-US