Article View: comp.lang.c
Article #574Re: Taming The Switch-Statement
From: Janis Papanagnou
Date: Mon, 19 Oct 2026 22:55
Date: Mon, 19 Oct 2026 22:55
26 lines
2723 bytes
2723 bytes
On 2026-10-19 23:57, Michael S wrote: > On Mon, 19 Oct 2026 23:27:03 +0200 > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: > [...] > > If C was as strongly typed from the beginning as it ended up in the 2nd > half of the 70s then it would make sense to use postfix . (dot) instead > of prefix * as dereference operator. Well, in "C" we have (for pointers) at least "p->v" as shortcut of "(*p).v" which is good to have! But that '->' is a dyadic operator and makes (for this specific case) the deref operator unnecessary. We still need it for other purposes, like the often cited "*a++ = *b++". I don't see how the situation would have been different in the 1970's, though. But nevermind. (Other languages might not even impose the differentiation and just have "p.v" and "s.v" for both, access of components referenced by pointer or direct struct access. Yet other languages do any 'deref' implicitly.) Janis > [...]
Technical Details
Message-ID:
<11b674f$1l24u$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> <11arjmc$2qid7$1@dont-email.me> <11at5vi$5vu$1@reader2.panix.com> <11auad0$3no1k$1@dont-email.me> <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me> <11b2a6d$131h6$1@dont-email.me> <20261018172446.00002d43@yahoo.com> <11b2mqu$16mof$3@dont-email.me> <20261018182627.00001934@yahoo.com> <11b2r36$3pvda$8@dont-email.me> <20261018193201.00000b13@yahoo.com> <11b56s8$1kr9u$2@dont-email.me> <20261019223538.00006521@yahoo.com> <11b61v8$1kr9u$6@dont-email.me> <20261020005720.000026c2@yahoo.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: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Tue, 20 Oct 2026 00:55:11 +0200 Organization: A noiseless patient Spider Lines: 26 Message-ID: <11b674f$1l24u$1@dont-email.me> 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> <11aupfl$3ul$1@reader2.panix.com> <11avmfb$55rt$1@dont-email.me> <11b2a6d$131h6$1@dont-email.me> <20261018172446.00002d43@yahoo.com> <11b2mqu$16mof$3@dont-email.me> <20261018182627.00001934@yahoo.com> <11b2r36$3pvda$8@dont-email.me> <20261018193201.00000b13@yahoo.com> <11b56s8$1kr9u$2@dont-email.me> <20261019223538.00006521@yahoo.com> <11b61v8$1kr9u$6@dont-email.me> <20261020005720.000026c2@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 19 Oct 2026 22:55:12 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1738910"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PHXnvygFNUoTjc7AXzPWa"; posting-host="9a1787de1638a6d9f83c958712c1b12a" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:bX9RUhK4iCtkzRz4VHhc1NfLG4E= sha256:XPqG9QtdQCvWcIrz82uR8CNB51aGHoOqV5taGihzkQM= sha1:EGE/9+UddF8/kGuaqQHPVrlzCNg= sha256:Amloo8s9zJ865TTr0Cv/tEMxVTOWcAbBUH6tKg088GM= In-Reply-To: <20261020005720.000026c2@yahoo.com> Content-Language: en-US