Article View: comp.lang.c
Article #434Re: Taming The Switch-Statement
From: bart
Date: Thu, 15 Oct 2026 22:22
Date: Thu, 15 Oct 2026 22:22
105 lines
5500 bytes
5500 bytes
On 15/10/2026 21:42, Dan Cross wrote:
> In article <11aqpl3$2gdup$1@dont-email.me>, bart <bc@freeuk.com> wrote:
> Those seem like pretty meaningless statistics.
> Naturally, different languages will express these things differently.
My syntax has cleaner and simpler syntax compared to C, and handles
features like 'switch' more ergonomically. In this case, C had a 20%
higher line count - fact.
But it seems people don't value cleaner, more productive syntax when it
it comes to 'serious' languages, only scripting ones. OK; your loss.
> This whole discussion could be summarized as:
>
> Bart: "C sucks because Dennis Ritchie stupidly reused `break`
> for both loops and switch. He was a tasteless fool."
> All: "You can work around that really easily."
> Keith: "C added labeled break and continue...."
> Bart: "C sucks. My language is better. Here, I fixed C in 4
> lines of code with my `breakloop`, but it still sucks
> because C is hopeless."
> Me: "No, the real problem is that there's no structured way
> break out of nested contexts; your thing only addresses
> one special case, and does not compose, so can't cover
> the general case."
> Bart: "No, it's the overloading. C is terrible and you're all
> just too blind to see it. You are all fools, like
> Dennis Ritchie."
> Me: "I mean, Keith told you how the language is being changed
> to address your problem _and_ the other problems in this
> general category."
> Bart: "Those other problems don't matter. C will never change.
> It will suck forever. I mean, have you ever even seen a
> use case for these labeled blocks? I don't like them,
> therefore they suck, just like C. They also suck
> because they solve a problem I don't care about. I have
> been doing this for 45 years."
> Me: "Here's a program that illustrates the problem. The code
> is shit, but shows how it can be used...."
> Bart: "This program sucks! You don't _need_ to do it this
> way."
> Me: "...I mean, I told you it sucked when I posted it...."
> Bart: "...I rewrote it in my language. I saved 377 bytes. See
> how much C sucks now? My language is better.
> Me: "...."
> Bart: "My lexer is 50% faster than your lexer. My production
> code is an order of magnitude faster. I am a very smart
> boy, and deserve a very special gold star on my report
> card."
> Me: "...Bruh."
You know, I could well be right about all those points. Maybe my
language that has been around for 45 years really is a sweeter, cleaner
'C' which has solved most of the latter's quirks.
And maybe other people's responses to that is just sour grapes.
However one of interests is PL design - specifically at this level - and
how C gets it so wrong, how people defend it so much, how it evolves so
glacially, how much fixing its shortcomings is offloaded to tools, is
fascinating.
It would have been nice to have a more objective discussion about such
aspects, with people not afraid to be a LOT more critical of C and its
tools that they have been.
But I guess this is the wrong forum for that.
> Bart: "Dennis Ritchie was a fool. A fool, I say! Haha!>
Ahahaha! Muwhahaha!"
Simplest kind of function pointer:
Bart: ref proc
DMR: void(*)(void)
Simplest function pointer variable:
Bart: ref proc abc
DMR: void(*abc)(void);
Two such variables:
Bart: ref proc one, two
DMR void (*one)(void), (*two)void; // I think
Two variables each an array 10 of such pointers:
Bart: [10]ref proc one, two
DMR: No fucking clue mate...
(Apparently it would be this, according to a tool which transpiles to C:
void (*one[10])(void), (*two[10])(void);
Fucking hell. Actually I didn't call DMR a fool. I did mention a
'numskull' which I now withdraw; I prefer to criticise ideas not people.
But this is a disaster.)
Technical Details
Message-ID:
<11arjmc$2qid7$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-mailReferences:
<119qf6l$2rmg3$1@dont-email.me> <11aqbqv$2avn3$1@dont-email.me> <11aqect$hpr$1@reader2.panix.com> <11aqpl3$2gdup$1@dont-email.me> <11ardsd$26m$1@reader2.panix.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: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Thu, 15 Oct 2026 23:22:04 +0100 Organization: A noiseless patient Spider Lines: 105 Message-ID: <11arjmc$2qid7$1@dont-email.me> References: <119qf6l$2rmg3$1@dont-email.me> <11aqbqv$2avn3$1@dont-email.me> <11aqect$hpr$1@reader2.panix.com> <11aqpl3$2gdup$1@dont-email.me> <11ardsd$26m$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 15 Oct 2026 22:22:05 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2967975"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mSkWU/6Yn0TEcGsWJG/Hf"; posting-host="3f7a5532ffaf673b54a2292b8a86a9eb" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:XmNNJ6kend4MO+BRKkMetDTLar0= sha256:3oC9HJs7btrrEkQ56QXWJkw2W3oZ5Gi4+WXUK2nh3uU= sha1:XoMNU0mFykWZ19+UZt2tSKMnHdY= sha256:ALR5u9EAAL8yceEZhb/FMNNoh32MTDWzZhf5KYH1cw4= In-Reply-To: <11ardsd$26m$1@reader2.panix.com> Content-Language: en-GB