Article View: comp.lang.c
Article #480Re: Taming The Switch-Statement
From: bart
Date: Sat, 17 Oct 2026 20:40
Date: Sat, 17 Oct 2026 20:40
88 lines
4933 bytes
4933 bytes
On 17/10/2026 18:58, Dan Cross wrote: > In article <11avmfb$55rt$1@dont-email.me>, bart <bc@freeuk.com> wrote: >> On 17/10/2026 04:19, Dan Cross wrote: >>> In article <11auad0$3no1k$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>>> Those are considered more productive. >>> >>> ...and you think that's because of the syntax, and not the high >>> level nature of those languages? >> >> It's a combination. > > Riiiight. So greatly simplifying syntax, all other things being equal, does not increase productivity at all? Gotcha. > Yes. C's declaration syntax is famously abstruse; film at 11. And ... that's it? Just accept it? How about doing something about it! I'm angry because to me C was so unusable that I had to create and maintain my own products over decades. Then I later found that C had insinuated itself into every API and every open source product I wanted to use. Even ABIs, supposedly language-neutral, pay deference to it. Even as a compiler target, there was no other choice. So I ended having to deal with it anyway, but thankfully avoided have to write it. >> If C had used LTR type syntax and somebody >> proposed using inside-out back-and-forth syntax like 'void(*)(void)', >> they'd think they were having a laugh, as it would be ridiculous. > > Unknowable. You do know; you just don't want to admit it. (Imagine introducing C declarations into a current language.) > Then your point is minor at best. Here's a thought experiment: > suppose I suddenly came to my senses and agreed with everything > you say: I'm willing to totally toss out C and adopt Bart's > language yesterday. THIS IS NOT ABOUT MY LANGUAGE! Why hasn't there long been an alternative systems language that didn't have C's crazy syntax and stupid quirks? I mean like 30-50 years ago. Yes, mine has lots of examples of how some alternative features could work; so what? I am not selling my language. > Where do I get a compiler? What learning > resources exist? Oh, and I need it to generate code for an > ARM Cortex-M0 part; does it do that? I also need RV64GC and > x86_64 and probably aarch64, too. Might want to throw in > Xtensa while we're at it: does your compiler do all of that? > What if I need a debugger? Oh, and I need to use crypto > libraries that are supplied from a vendor; they use the C ABI. > What's the inter-op story like? My language was for in-house use; it was never intended as a product. (If you really want to try it, I can supply an ASM file for you to build, but it works on Windows. I can no longer supply a transpiled C version that part work on Linux; I have destroyed my C-related projects.) The C API (not ABI) point is valid, and another bugbear. Why can't APIs be expressed in a language-agnostic manner? This would help other languages that also need to solve the problem of creating bindings to libraries that primarily use a C API. C is a terrible choice for a cross-language API, as too many C-isms creep in (like C macros, or vaguely defined types, including the famous 'plain char' that exists in no other language, which is neither signed nor unsigned, and above all C preprocessor features). > Good for you. Totally irrelevant to the history of C. It means that meagre hardware resources don't have to compromise the design of a language, especially when it comes to syntax. So you can't use limited resources as an excuse for its questionable choices. Actually some choices actually made it harder to parse.
Technical Details
Message-ID:
<11b0mfv$j5ll$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> <11auad0$3no1k$1@dont-email.me> <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me> <11b0cvs$skc$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: Sat, 17 Oct 2026 21:40:31 +0100 Organization: A noiseless patient Spider Lines: 88 Message-ID: <11b0mfv$j5ll$1@dont-email.me> References: <119qf6l$2rmg3$1@dont-email.me> <11auad0$3no1k$1@dont-email.me> <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me> <11b0cvs$skc$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 17 Oct 2026 20:40:32 +0000 (UTC) Injection-Info: dont-email.me; logging-data="628405"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191WsHX9tLAZuYfsP66+8/x"; posting-host="f42af6156aabd93e2f9ced57c648ec1a" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:l7ChYEoGoljX9XIt+0RUTj7TFGo= sha256:VL7jDviVrz4X6Xm5QhJ7bJUpdPHbxtim6iBdpeXzCbA= sha1:X55c58ZWdlWRz2jyMWANJH4MtWc= sha256:Uk5MkdjTS1j+0CjIsmrY681KmWjOi2tuSAzo2dEcmGI= Content-Language: en-GB In-Reply-To: <11b0cvs$skc$1@reader2.panix.com>