Article View: comp.lang.c
Article #618Re: Taming The Switch-Statement
From: Dan Cross
Date: Tue, 20 Oct 2026 21:44
Date: Tue, 20 Oct 2026 21:44
49 lines
2708 bytes
2708 bytes
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. On the other hand, the code David posted _is_ readable, because it uses the language to encode domain-specific information into type names. >(Within the app, PCL is the name of a bytecode language, and 'pcl' is a >reference to a specific instruction. > >Next time I'll just use T for such examples, since the type is not >relevant to the point. Although that didn't stop you seizing upon my F >function.) You just don't get it. I suspect you have no idea what the `typedef`s David posted actually represent. >>> Here is the one place I do remember using typedef for a function pointer >>> (from an old project, not in C): >>> >>> type fnptr = ref proc >>> >>> repeat >>> (fnptr(pcptr^))^() >>> until stopped > >> More generally, I fail to see what this is trying to >> demonstrate. > >Not much. It is just a rare example of my using aliases for function >pointers. Because I suggested such aliases are often unnecessary and >partly used in C to get around the fiddly type syntax that would arise. Yeah, you really just don't get it. - Dan C.
Technical Details
Message-ID:
<11b8nc4$9aq$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-mailReferences:
<119qf6l$2rmg3$1@dont-email.me> <11b7k22$2v8e5$1@dont-email.me> <11b8f5h$67l$1@reader2.panix.com> <11b8j17$3btus$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: Tue, 20 Oct 2026 21:44:36 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <11b8nc4$9aq$1@reader2.panix.com> References: <119qf6l$2rmg3$1@dont-email.me> <11b7k22$2v8e5$1@dont-email.me> <11b8f5h$67l$1@reader2.panix.com> <11b8j17$3btus$1@dont-email.me> Injection-Date: Tue, 20 Oct 2026 21:44:36 -0000 (UTC) Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="9562"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross)