πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1568

Re: Inversion-of-control and dependency-injection in C

#1568
From: Bonita Montero
Date: Mon, 16 Nov 2026 15:23
13 lines
2083 bytes
Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:

> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.

A frequently cited point in this context is that `std::sort()` is
typically many times faster than `qsort()`, thanks to the inlining
of the function object. Furthermore, a function object can easily
incorporate an external context by capturing it within a lambdaβ€”
something that is simply not possible with `qsort()`, where a C
-style comparison function is restricted to accessing only global
variables. This falls far short of the capabilities offered by
functional programming. In other words: C is incapable of func-
tional programming.
Technical Details
Message-ID: <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org>
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!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com> <11d54jb$80v7$1@raubtier-asyl.eternal-september.org> <11d56pj$8sfe$1@dont-email.me>

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!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Inversion-of-control and dependency-injection in C
Date: Mon, 16 Nov 2026 16:23:23 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org>
References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com>
 <11d54jb$80v7$1@raubtier-asyl.eternal-september.org>
 <11d56pj$8sfe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 16 Nov 2026 15:23:24 +0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org;
	logging-data="3857892"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX194b6nJTk1xDAXID0v4vfPtKoNDGHUFe0k="; posting-host="db39595f949976c8264d8b4dd7eaeae3"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Vqe8AR/LJXgRXHyOfz5FRK2RjBg= sha256:7xa99J1YztOoUfimOYLGab5MNcGKCQ8XRwPGTO7AgZ8=
	sha1:0ADu3sqtj9oO37LCMpsnbX4P7/U= sha256:X21L/u5xHr1vlcxwlxGllEG16SJ3r1MSw8BeMs4DK4k=
Content-Language: de-DE
In-Reply-To: <11d56pj$8sfe$1@dont-email.me>