🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #465

Re: Taming The Switch-Statement

#465
From: Dan Cross
Date: Sat, 17 Oct 2026 03:19
120 lines
5646 bytes
In article <11auad0$3no1k$1@dont-email.me>, bart  <bc@freeuk.com> wrote:
>On 16/10/2026 13:40, Dan Cross wrote:
>> In article <11arjmc$2qid7$1@dont-email.me>, bart  <bc@freeuk.com> wrote:
>
>>  Has it truly
>> never occurred to you that many other people just don't consider
>> your syntax significantly cleaner, or more productive?
>
>So why is this style of syntax popular within scripting languages? (Lua, 
>Julia, Ruby...)
>
>Those are considered more productive.

...and you think that's because of the syntax, and not the high
level nature of those languages?

Wow.

>> Perhaps people dismiss what you say because, despite your
>> self-aggrandizing words, you've shown that you don't actually
>> know C very well,
>
>See the type syntax example below. How well do you need to know a 
>language to see that that is just effing crazy? This is supposed to be a 
>HLL, not a puzzle that needs to be solved or decoded via algorithms or 
>employing tools!

Yes, the syntax is pretty gnarly; Dennis Ritchie even said as
much.  Fixed in Go and Rust, but also, I doubt you've ever in
your life had a variable of type array of array of length 8 of
a pointer to a pointer to a function returning an array of
pointers to char.  Finding the most ridiculous example you can
is not really evidence of anything besides your weird obsession
with finding abstruse corner cases and holding them up as
reasons to dislike C.

>> For someone who claims to want to discuss C objectively, you
>> sure do make a lot of subjective statements.
>
>Concerning type declaration syntax, lots of people including the C 
>creators agree that it was misguided.

Yup.  But stupid examples are just stupid.

>If lots of people agree, is that still being subjective? This is the 
>example I think used in K&R:
>
>  char *(*(**foo [][8])())[];
>
>Most would consider this gobbledygook even if you know the rules. It is 
>atrocious syntax. And what's 'foo' doing in the middle of it!

Yup.  That's awful.

>I think being defensive about it is being subjective, as you demonstrate 
>here:
>
> >> [snip; don't care]

I fail to see how me not caring about your silly examples is
being defensive about C.  It says nothing about what I think
about C one way or the other; it only says I think your
arguments are poorly grounded.

>That is pretty much the attitude here in a nutshell.
>
>What's often stated also is how successful C has been, but that doesn't 
>magically make the syntax wonderful.

No one is claiming that C's popularity implies it's a "good"
language, however you'd like to define that.  There are useful
properties that come with using it, including a large ecosystem
of libraries and tools, huge number of programmers who know it,
lots of high-quality references, and so on.  But again, that
doesn't mean that C is good, just that we can leverage it's
popularity _usefully_.

>If DMR had instead produced a language that looked like mine (say like 
>one of the Algols), and I came along in 2026 and proposed a syntax that 
>looked like the above, what do you think the response would be?

But he didn't, and you didn't, so this is a meaningless
historical, "what if?"

>I would rightly be laughed out of the forum.

Bruh...I hate to break it to you, but....

>So being 'objective' means disregarding history and widespread adoption. 

Well, no...both of those are factors in choosing a language or
not.  We can discuss the semantics of the language, it's syntax,
etc; but we can also discuss tooling, engineering resources
availability (can you find programmers who know C?  More like,
can you find programmers who _don't_ know C, amirite?), library
and platform support, and so on.

>The latter doesn't make the language better, just more tolerated, with 
>more effort put into tools to make it practical to use (with a nice 
>sideline in teaching all its ins and outs).

This I can almost get behind, but you miss the forest for the
trees.  All those resources?  They exist; we can leverage them.
For BartLang?  Not so much.

Is C a good language?  Meh, it's not the worst, but far from the
best I've seen.  Was it a bad language in 1972, when it was
targeting a PDP-11/20?  No, it was pretty decent for that era.
Did it do all the stuff that fancy languages with advanced
compilers that ran on big machines could do?  No.  Did it need
to?  Also no.

>Anyway, to me, pretty much the whole of C looked as badly and crudely 
>put together as that, when I first came across it in 1982. My background 
>had been with quite different languages.

Yup.  Good for you.  So why do you keep posting here?

	- Dan C.
Technical Details
Message-ID: <11aupfl$3ul$1@reader2.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Sat, 17 Oct 2026 03:19:17 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <11aupfl$3ul$1@reader2.panix.com>
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>
Injection-Date: Sat, 17 Oct 2026 03:19:17 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="4053"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)