Article View: comp.lang.c
Article #1698Re: Inversion-of-control and dependency-injection in C
From: bartc
Date: Fri, 20 Nov 2026 14:01
Date: Fri, 20 Nov 2026 14:01
47 lines
3587 bytes
3587 bytes
On 20/11/2026 13:48, Ross Finlayson wrote: > On 11/20/2026 04:35 AM, Tristan Wibberley wrote: >> On 16/11/2026 18:09, Bonita Montero wrote: >>> Am 13.11.2026 um 23:50 schrieb Ross Finlayson: >>> >>>> So, here's one. Say you got a server process for sockets of the >>>> connection-oriented or datagram-wise or association-oriented like >>>> TCP, UDP, or SCTP, and it manages the connecting and the sending and >>>> receiving about a million of those and is sort of fixed-size and >>>> stable in a usual runtime. So, how do you design the interface, >>>> about stuff like the state-machine of _protocols_, all about >>>> _protocols_, in the application-layer and above, say, for example >>>> the incremental-parsing and the state-machine of the protocol >>>> and sub-protocols and upgrade-protocols and the like, what sort >>>> of abstraction with suitable-defaults and reasonable-opinions >>>> makes for having any sort protocol as a composable library. >> >>> Use C++20 coroutines with Bost.ASIO and io_uring. This gives >>> as less code as possible with nearly optimal I/O performance. >> >> I like this answer. >> >> It's funny: people used coroutines and CoEs back in the 1970s (I did it >> as a child, myself), then everyone told each other to stop it, now 50 >> years later here we are again, finally succeeding once more after a long >> hiatus, albeit with appalling syntax and semantics everywhere around it >> like thorny bushes. >> <snip 147-line reply> > (This is not "A.I.", Oh, so it's you choosing to post endless reams of gibberish. Just, WHY? Nobody here has the patience to read through that crap let alone try and understand what the hell you're on about or what relevance it has to anything. > though "AP" does have a stated opinion Who the fuck is AP? On second thoughts, never mind; I don't want a 5,000-word exposition!
Technical Details
Message-ID:
<11dpjrl$37ksg$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com> <11d56gl$3ud5q$1@dont-email.me> <11d6vjp$qhu8$1@raubtier-asyl.eternal-september.org> <dsednTD-Fblclmr3nZ2dnZfqnPWdnZ2d@giganews.com> <11d738r$ru7a$1@dont-email.me> <11d75i7$spj0$1@dont-email.me> <11d7c8k$173nk$1@dont-email.me> <11d7fbv$1839o$2@dont-email.me> <nrecnTdvuvbACWr3nZ2dnZfqn_adnZ2d@giganews.com> <11dfgtf$3pj6i$1@raubtier-asyl.eternal-september.org> <11dpeqd$35ddj$1@dont-email.me> <WJOcnajl6sIw0p32nZ2dnZfqn_udnZ2d@giganews.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: bartc <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: Inversion-of-control and dependency-injection in C Date: Fri, 20 Nov 2026 14:01:26 +0000 Organization: A noiseless patient Spider Lines: 47 Message-ID: <11dpjrl$37ksg$1@dont-email.me> References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com> <11d56gl$3ud5q$1@dont-email.me> <11d6vjp$qhu8$1@raubtier-asyl.eternal-september.org> <dsednTD-Fblclmr3nZ2dnZfqnPWdnZ2d@giganews.com> <11d738r$ru7a$1@dont-email.me> <11d75i7$spj0$1@dont-email.me> <11d7c8k$173nk$1@dont-email.me> <11d7fbv$1839o$2@dont-email.me> <nrecnTdvuvbACWr3nZ2dnZfqn_adnZ2d@giganews.com> <11dfgtf$3pj6i$1@raubtier-asyl.eternal-september.org> <11dpeqd$35ddj$1@dont-email.me> <WJOcnajl6sIw0p32nZ2dnZfqn_udnZ2d@giganews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 20 Nov 2026 14:01:25 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3396496"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lFwelWXouwUV8CRrYWzex"; posting-host="1cd41574d80af3ac31c15c11e205f0eb" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:cEzfaqbn/MltVUZ3T3xovQpbj1o= sha256:5IMGkxFuxVKThiCiohLz9Q2EV4qdqR5KG9UMmYds4wY= sha1:YaFesGviuq+Zee/Rb3ZyskcVw5Q= sha256:+XYUjsTTvpzXFg/IHBEkMl5e29BndeLJ86moNQRZeac= In-Reply-To: <WJOcnajl6sIw0p32nZ2dnZfqn_udnZ2d@giganews.com> Content-Language: en-GB