Article View: comp.lang.c
Article #626Re: Taming The Switch-Statement
From: bart
Date: Wed, 21 Oct 2026 01:39
Date: Wed, 21 Oct 2026 01:39
49 lines
3030 bytes
3030 bytes
On 21/10/2026 01:56, Dan Cross wrote: > In article <11b8qqg$3ejlp$1@dont-email.me>, bart <bc@freeuk.com> wrote: >> On 20/10/2026 22:44, Dan Cross wrote: >>> In article <11b8j17$3btus$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>>> On 20/10/2026 20:24, Dan Cross wrote: >>>>> In article <11b7k22$2v8e5$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>>> >>>>> The point is that the name you chose is meaningless to anyone >>>>> other than you. What's a PCL? Phase Control Line? Printer >>>>> Command Language? Photon Compressor Loop? >>>> >>>> Within the context of that application then it would be clear. You're >>>> just being overly hostile. >>> >>> Not really. You are, I presume, posting that code to try and >>> make some kind of point about how "readable" it is. But it's >>> not readable unless you already know what it does. >> >> What it does not relevant. This is simply defining an array of T. But >> because T happens to be a function pointer, DB insists that an alias >> must be created, and a new name invented. >> >> Why? Probably because in C, the syntax for function pointers gets hairy. > > I dunno; your syntax didn't seem any clearer to me. Yeah, the C is so much clearer. Of course, you would all lie through your teeth anyway before you'd admit mine might be simpler. I've just defined three entities: a variable, a function pointer, and a function, in both my syntax and in C's. Here are the first tokens of the C versions: int int int Can you guess which one is which yet? Here are the first three tokens in my syntax: int func ref Any easier? This is like PL Design 101.
Technical Details
Message-ID:
<11b954e$3hjvi$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> <11b8j17$3btus$1@dont-email.me> <11b8nc4$9aq$1@reader2.panix.com> <11b8qqg$3ejlp$1@dont-email.me> <11b92j1$dhb$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: Wed, 21 Oct 2026 02:39:27 +0100 Organization: A noiseless patient Spider Lines: 49 Message-ID: <11b954e$3hjvi$1@dont-email.me> References: <119qf6l$2rmg3$1@dont-email.me> <11b8j17$3btus$1@dont-email.me> <11b8nc4$9aq$1@reader2.panix.com> <11b8qqg$3ejlp$1@dont-email.me> <11b92j1$dhb$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 21 Oct 2026 01:39:27 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3723250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18b0Vp4xsxqNy0A2Gm5a/lS"; posting-host="c65e78a22dc81d6f5c20317bcf66a407" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:yQBDU+wQ7uEeSq6saS/dcU7NUDY= sha256:360czXvoMlVZ7t9f8/qArTmiud93XgUzh0bA8O6JWo8= sha1:k09RC8NBXwv60IAuHZBzv0nb3Vg= sha256:EEDSwwN6O/REAW2vVVwQn0ZU6cg2XYtY7e9jEppt6OY= Content-Language: en-GB In-Reply-To: <11b92j1$dhb$1@reader2.panix.com>