Article View: comp.lang.c
Article #1569Re: Inversion-of-control and dependency-injection in C
From: fir
Date: Mon, 16 Nov 2026 15:29
Date: Mon, 16 Nov 2026 15:29
21 lines
2403 bytes
2403 bytes
Bonita Montero pisze: > 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. you can write you own sort or paste if trom the net and its not worse than c++ in some thread on this as maybe you remember i taka a contest ;c on c++ sort and beat it much (as far as i remember by code taken from net)
Technical Details
Message-ID:
<11df7h3$3lpoh$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> <11d54jb$80v7$1@raubtier-asyl.eternal-september.org> <11d56pj$8sfe$1@dont-email.me> <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org>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: fir <profesor.fir@gmail.com> Newsgroups: comp.lang.c Subject: Re: Inversion-of-control and dependency-injection in C Date: Mon, 16 Nov 2026 16:29:39 +0100 Organization: A noiseless patient Spider Lines: 21 Message-ID: <11df7h3$3lpoh$1@dont-email.me> References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com> <11d54jb$80v7$1@raubtier-asyl.eternal-september.org> <11d56pj$8sfe$1@dont-email.me> <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 16 Nov 2026 15:29:40 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3860241"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AyfiY9QJ0rc63IlMapooPH/oEHftjRPA="; posting-host="ffaeb1a4357f66637402e7443ff79a2b" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:ig87FLhbNf9BqBh+TyEDXms5XgM= sha256:W5efvri/q+woxjT/AoUBUQMwN0DOZ57hqPonIdWmlOk= sha1:cVycnmqXjw36Yh7y7z3J0aRSYPM= sha256:1ikqI0XaZv6R3zl2UtWlXc8++d1rvcIBPdiWwEqvqUc= In-Reply-To: <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org>