Article View: comp.lang.c
Article #651Re: Taming The Switch-Statement
From: David Brown
Date: Wed, 21 Oct 2026 15:36
Date: Wed, 21 Oct 2026 15:36
32 lines
3098 bytes
3098 bytes
On 21/10/2026 16:41, bart wrote: > On 21/10/2026 12:21, David Brown wrote: >> On 21/10/2026 03:04, bart wrote: > >>> Here, one problem is that there are 3 types that I don't know and >>> would have to look up. >> >> Incorrect. > > If I wanted to use function from a language that is not C and for which > nobody has yet created a set of bindings, then I would have to > investigate every single abstract type. So for a one-in-a-million use-cases, you would have to look up the type, such as by holding your mouse over the type, or pressing the "navigate to definition" shortcut in your IDE. I think it is better to optimise for the 999,999 other cases. Or you could use a real programming language, for which there is probably SWIG support. > > Even then, I might find that a year later, 'err_t' has been defined to > be something slightly different. Standard types are easier to deal with > and more likely to be stable. Libraries change types for good reasons. Support for one person using an obscure language who does not want to have to look up a typedef is not going to influence that decision. The world does not revolve around you and your unique needs and wants.
Technical Details
Message-ID:
<11bam5q$1042$3@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> <11b2hr6$15thq$1@dont-email.me> <11b2l06$16mof$1@dont-email.me> <11b2qv0$19h68$1@dont-email.me> <11b35gt$1cn63$2@dont-email.me> <11b557o$1kr9u$1@dont-email.me> <11b56uo$1q18k$5@dont-email.me> <11b6224$2ejik$1@dont-email.me> <11b774o$2m8c9$3@dont-email.me> <11b7k22$2v8e5$1@dont-email.me> <11b7ogt$2m8c9$5@dont-email.me> <11b933e$3h3d0$1@dont-email.me> <11ba78m$3peq3$3@dont-email.me> <11baiuc$11ac$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!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Wed, 21 Oct 2026 17:36:26 +0200 Organization: A noiseless patient Spider Lines: 32 Message-ID: <11bam5q$1042$3@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> <11b2hr6$15thq$1@dont-email.me> <11b2l06$16mof$1@dont-email.me> <11b2qv0$19h68$1@dont-email.me> <11b35gt$1cn63$2@dont-email.me> <11b557o$1kr9u$1@dont-email.me> <11b56uo$1q18k$5@dont-email.me> <11b6224$2ejik$1@dont-email.me> <11b774o$2m8c9$3@dont-email.me> <11b7k22$2v8e5$1@dont-email.me> <11b7ogt$2m8c9$5@dont-email.me> <11b933e$3h3d0$1@dont-email.me> <11ba78m$3peq3$3@dont-email.me> <11baiuc$11ac$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 21 Oct 2026 15:36:27 +0000 (UTC) Injection-Info: dont-email.me; logging-data="32898"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1854SGmvKeM11+ic4NHp+WK02/YUsiyHLM="; posting-host="f78456a6491f23b3f53847b5a3287905" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Ea6Ucu8C1c3a3Kzm9hpGYhND/lg= sha256:IKcBHPcVwlXaNZlMQNIPc+ciQZzJPFIuK3Vpjwd+aP8= sha1:9BJgiEr/EyJQAV4CbNmge1Drc2U= sha256:gVZurdjaEvzKuR9BiMqQuxxfAs9PPOsai3jF2wwrnpQ= In-Reply-To: <11baiuc$11ac$1@dont-email.me> Content-Language: en-GB, nb-NO